1. Home
  2. Explore
  3. Mathematics
  4. Modular Arithmetic

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Modular Arithmetic

  • 63Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Number Theory Foundations
Bézout's identity states that for integers aaa and bbb, their greatest common divisor can be written as
.

63 questions

  1. 1
    Bézout's identity states that for integers aaa and bbb, their greatest common divisor can be written as
    _____
    .
    Hint

    Think of a linear combination of the two integers.

    Answer

    as+btas + btas+bt for some integers sss and ttt

    Explanation

    Bézout's identity says that there exist integers sss and ttt such that gcd⁡(a,b)=as+bt\gcd(a,b) = as + btgcd(a,b)=as+bt.

  2. 2
    The extended Euclidean algorithm, also called the
    _____
    , can efficiently compute coefficients in Bézout's identity.
    Hint

    The lecture used a playful name for this algorithm.

    Answer

    pulverizer

    Explanation

    The pulverizer is the extended Euclidean algorithm, which efficiently finds integers sss and ttt expressing gcd⁡(a,b)\gcd(a,b)gcd(a,b) as as+btas + btas+bt.

  3. 3
    An integer can be written as a linear combination of aaa and bbb if and only if it is divisible by
    _____
    .
    Hint

    This is the greatest common divisor criterion for linear combinations.

    Answer

    gcd⁡(a,b)\gcd(a,b)gcd(a,b)

    Explanation

    The integers expressible as linear combinations of aaa and bbb are exactly the multiples of their greatest common divisor.

  4. 4
    When working modulo nnn, computations focus on remainders and disregard
    _____
    .
    Hint

    These are the parts that do not affect the remainder after division by nnn.

    Answer

    multiples of nnn

    Explanation

    Numbers that differ by a multiple of nnn have the same remainder modulo nnn.

  5. 5
    Whether an integer is even or odd is determined by its remainder when divided by
    _____
    .
    Hint

    There are two possible remainders that classify integers as even or odd.

    Answer

    222

    Explanation

    Modulo 222, an even integer has remainder 000 and an odd integer has remainder 111.

  6. 6
    The last digit of an integer is determined by its remainder modulo
    _____
    .
    Hint

    The decimal numeral system has this many digits.

    Answer

    101010

    Explanation

    Two integers with the same remainder modulo 101010 have the same last digit.

  7. 7
    Because the hour on a clock repeats after a fixed number of hours, modular arithmetic is also called
    _____
    .
    Hint

    The name refers to a familiar timekeeping device.

    Answer

    clock arithmetic

    Explanation

    Clock arithmetic is a familiar example of modular arithmetic: after a full cycle, the displayed time repeats.

  8. 8
    The repeating cycle of days in a week means that day calculations can be done modulo
    _____
    .
    Hint

    A week contains this many days.

    Answer

    777

    Explanation

    A shift by any multiple of 777 days returns to the same day of the week, so only the remainder modulo 777 matters.

  9. 9
    The lecture noted that clock-hour calculations may use modulus 121212 or
    _____
    depending on whether AM or PM matters.
    Hint

    This modulus corresponds to a full day.

    Answer

    242424

    Explanation

    A clock may repeat every 121212 hours, while a full day consists of 242424 hours.

  10. 10
    The familiar fact that an even integer plus an odd integer is
    _____
    illustrates a calculation modulo 222.
    Hint

    Add the remainders 000 and 111 modulo 222.

    Answer

    odd

    Explanation

    An even integer has remainder 000 modulo 222 and an odd integer has remainder 111, so their sum has remainder 111 and is odd.

  11. 11
    aaa is congruent to bbb modulo nnn precisely when nnn
    _____
    a−ba-ba−b.
    Hint

    Use the definition of congruence in terms of the difference.

    Answer

    divides

    Explanation

    By definition, aaa and bbb are congruent modulo nnn if and only if a−ba-ba−b is a multiple of nnn.

  12. 12
    Modulo 555, the integers 171717 and 121212 are congruent because their difference is
    _____
    .
    Hint

    Subtract the two integers and check whether the result is divisible by the modulus.

    Answer

    555

    Explanation

    Since 17−12=517-12=517−12=5 and 555 divides 555, the integers are congruent modulo 555.

  13. 13
    Modulo 555, the integers 171717 and 333333 are not congruent because their difference is not a
    _____
    of 555.
    Hint

    Check whether 17−3317-3317−33 can be divided evenly by 555.

    Answer

    multiple

    Explanation

    Their difference is −16-16−16, which is not a multiple of 555, so they are not congruent modulo 555.

  14. 14
    The congruence class of 000 modulo 555 contains all integers of the form
    _____
    .
    Hint

    Every member differs from 000 by a multiple of 555.

    Answer

    5q5q5q for an integer qqq

    Explanation

    The class consists of all multiples of 555, including 000, positive multiples, and negative multiples.

  15. 15
    The congruence class of 111 modulo 555 includes 111, 666, 111111, −4-4−4, and
    _____
    .
    Hint

    Each listed integer differs from 111 by a multiple of 555.

    Answer

    −9-9−9

    Explanation

    The integer −9-9−9 differs from 111 by −10-10−10, a multiple of 555, so it belongs to the same congruence class.

  16. 16
    To identify the congruence class of an integer modulo nnn, divide it by nnn and use the
    _____
    .
    Hint

    It is the part left over after division.

    Answer

    remainder

    Explanation

    Every integer is congruent modulo nnn to its remainder upon division by nnn.

  17. 17
    If k=5q+rk=5q+rk=5q+r with 0≤r<50\le r<50≤r<5, then the congruence class of kkk modulo 555 is represented by
    _____
    .
    Hint

    The division theorem identifies the representative in the standard range.

    Answer

    rrr

    Explanation

    The quotient term 5q5q5q is a multiple of 555, so kkk and rrr are congruent modulo 555.

  18. 18
    For modulus nnn, the standard representatives of all congruence classes are the integers from 000 through
    _____
    .
    Hint

    These are exactly the possible nonnegative remainders upon division by nnn.

    Answer

    n−1n-1n−1

    Explanation

    The possible remainders are 0,1,…,n−10,1,\ldots,n-10,1,…,n−1, giving nnn distinct congruence classes.

  19. 19
    The congruence classes modulo nnn form a
    _____
    of all the integers.
    Hint

    A partition groups every element into exactly one disjoint group.

    Answer

    partition

    Explanation

    Every integer belongs to exactly one congruence class modulo nnn, so the classes partition the integers.

  20. 20
    Two integers are congruent modulo nnn if and only if they have the same
    _____
    when divided by nnn.
    Hint

    This is the remainder characterization of congruence.

    Answer

    remainder

    Explanation

    Equal remainders imply that the difference is divisible by nnn, and a difference divisible by nnn implies equal remainders.

  21. 21
    The division theorem requires a positive divisor ddd and gives integers qqq and rrr such that n=qd+rn=qd+rn=qd+r with
    _____
    .
    Hint

    The remainder lies in a range starting at zero and ending just below the divisor.

    Answer

    0≤r<d0\le r<d0≤r<d

    Explanation

    For every integer nnn and positive integer ddd, the division theorem gives n=qd+rn=qd+rn=qd+r with 0≤r<d0\le r<d0≤r<d.

  22. 22
    For fixed nnn and positive ddd, the quotient and remainder in n=qd+rn=qd+rn=qd+r are
    _____
    .
    Hint

    The division theorem guarantees exactly one valid pair.

    Answer

    unique

    Explanation

    There is exactly one pair of integers (q,r)(q,r)(q,r) satisfying n=qd+rn=qd+rn=qd+r and 0≤r<d0\le r<d0≤r<d.

  23. 23
    In the division theorem, qqq is called the
    _____
    .
    Hint

    It counts how many full groups of size ddd fit into the division.

    Answer

    quotient

    Explanation

    In n=qd+rn=qd+rn=qd+r, the integer qqq is the quotient and rrr is the remainder.

  24. 24
    In the division theorem, rrr is called the
    _____
    .
    Hint

    It is the amount left after taking out full multiples of the divisor.

    Answer

    remainder

    Explanation

    In n=qd+rn=qd+rn=qd+r, the integer rrr is the remainder, constrained by 0≤r<d0\le r<d0≤r<d.

  25. 25
    The lecture also called the remainder the
    _____
    of a number modulo nnn.
    Hint

    This term describes the representative left after reducing modulo the modulus.

    Answer

    residue

    Explanation

    A number is equivalent modulo nnn to its remainder, which can also be called its residue.

  26. 26
    The notation div⁡(n,d)\operatorname{div}(n,d)div(n,d) refers to the
    _____
    in the division theorem.
    Hint

    It corresponds to qqq in n=qd+rn=qd+rn=qd+r.

    Answer

    quotient

    Explanation

    The lecture used div⁡(n,d)\operatorname{div}(n,d)div(n,d), or infix ndiv⁡dn\operatorname{ div}dndivd, to denote the quotient.

  27. 27
    The notation rem⁡(n,d)\operatorname{rem}(n,d)rem(n,d) refers to the
    _____
    in the division theorem.
    Hint

    It corresponds to rrr in n=qd+rn=qd+rn=qd+r.

    Answer

    remainder

    Explanation

    The lecture used rem⁡(n,d)\operatorname{rem}(n,d)rem(n,d), or infix nrem⁡dn\operatorname{ rem}dnremd, to denote the remainder.

  28. 28
    In the lecture's convention, a remainder is always
    _____
    rather than negative.
    Hint

    The standard remainder range begins at zero.

    Answer

    non-negative

    Explanation

    The lecture defined remainders as non-negative; programming languages may use different conventions, especially with negative inputs.

  29. 29
    The lecture warned that the expression “aaa mod nnn” can be ambiguous because it may refer to congruence or to a
    _____
    .
    Hint

    One use describes a relationship; the other returns a value.

    Answer

    remainder function

    Explanation

    Congruence modulo nnn is a relation between numbers, whereas a mod operation may denote the remainder produced by a function.

  30. 30
    If aaa is congruent to bbb modulo nnn, then adding the same ccc preserves congruence: a+ca+ca+c is congruent to
    _____
    modulo nnn.
    Hint

    Add the same quantity to both representatives.

    Answer

    b+cb+cb+c

    Explanation

    Replacing a number by a congruent one preserves the result of addition modulo nnn.

  31. 31
    If aaa is congruent to bbb modulo nnn, subtracting the same ccc gives a−ca-ca−c congruent to
    _____
    modulo nnn.
    Hint

    Apply the same subtraction to both sides of the congruence.

    Answer

    b−cb-cb−c

    Explanation

    Congruent values remain congruent when the same quantity is subtracted from each.

  32. 32
    If aaa is congruent to bbb modulo nnn, then subtracting each from the same ccc gives c−ac-ac−a congruent to
    _____
    modulo nnn.
    Hint

    The shared quantity appears first in both differences.

    Answer

    c−bc-bc−b

    Explanation

    The difference (c−a)−(c−b)=b−a(c-a)-(c-b)=b-a(c−a)−(c−b)=b−a is a multiple of nnn, so the two expressions are congruent.

  33. 33
    If aaa is congruent to bbb modulo nnn, multiplying both by ccc gives acacac congruent to
    _____
    modulo nnn.
    Hint

    Multiplication by the same integer preserves congruence.

    Answer

    bcbcbc

    Explanation

    Since nnn divides a−ba-ba−b, it also divides c(a−b)=ac−bcc(a-b)=ac-bcc(a−b)=ac−bc.

  34. 34
    For a positive integer exponent ccc, congruent bases have congruent powers: if aaa is congruent to bbb modulo nnn, then aca^cac is congruent to
    _____
    modulo nnn.
    Hint

    Repeated multiplication allows the base to be replaced at each step.

    Answer

    bcb^cbc

    Explanation

    The claim follows by induction on ccc, using preservation of congruence under multiplication.

  35. 35
    The induction proof for congruent bases begins with exponent c=1c=1c=1 and uses repeated multiplication for the
    _____
    step.
    Hint

    This is the step that moves from an exponent to the next one.

    Answer

    inductive

    Explanation

    Assuming the result for exponent c−1c-1c−1, multiply by the congruent bases and use the multiplication property to prove it for ccc.

  36. 36
    Even if aaa and bbb are congruent modulo nnn, one cannot generally replace the
    _____
    in cac^aca and cbc^bcb.
    Hint

    The base may be replaced under a positive power, but this other part is not generally interchangeable.

    Answer

    exponents

    Explanation

    Congruent bases yield congruent positive powers, but congruence of exponents does not generally imply congruence of the resulting powers.

  37. 37
    Modulo 555, (−1)1(-1)^1(−1)1 and (−1)6(-1)^6(−1)6 provide a counterexample to replacing congruent
    _____
    in an exponent.
    Hint

    The exponents 111 and 666 are congruent modulo 555, but the powers differ modulo 555.

    Answer

    exponents

    Explanation

    (−1)1=−1(-1)^1=-1(−1)1=−1 while (−1)6=1(-1)^6=1(−1)6=1, and these are not congruent modulo 555.

  38. 38
    When computing modulo 100100100, 113351133511335 can be replaced by
    _____
    .
    Hint

    Only the last two digits determine the remainder modulo 100100100.

    Answer

    353535

    Explanation

    113351133511335 and 353535 differ by 113001130011300, a multiple of 100100100, so they are congruent modulo 100100100.

  39. 39
    When computing modulo 100100100, 779977997799 can be replaced by
    _____
    .
    Hint

    Compare 779977997799 with the closest convenient multiple of 100100100.

    Answer

    −1-1−1

    Explanation

    779977997799 differs from −1-1−1 by 780078007800, a multiple of 100100100, so they are congruent modulo 100100100.

  40. 40
    Modulo 100100100, the powers of 353535 with even exponent greater than zero have remainder
    _____
    .
    Hint

    Start with 35235^2352 and observe the remainder when squaring the remainder.

    Answer

    252525

    Explanation

    35235^2352 is congruent to 252525 modulo 100100100, and 25225^2252 is also congruent to 252525, so subsequent positive even powers have remainder 252525.

  41. 41
    Modulo 100100100, powers of 353535 with odd exponent greater than one have remainder
    _____
    .
    Hint

    Multiply the even-power remainder by 353535.

    Answer

    757575

    Explanation

    An odd power greater than one is congruent to 25⋅35=87525\cdot35=87525⋅35=875, whose remainder modulo 100100100 is 757575.

  42. 42
    Because there are only 100100100 possible residues modulo 100100100, a sufficiently long sequence of powers must eventually
    _____
    .
    Hint

    Apply the pigeonhole principle to the possible remainders.

    Answer

    repeat

    Explanation

    Among more than 100100100 powers, at least two must have the same residue; the sequence then eventually repeats, though the cycle need not be short.

  43. 43
    The congruence 3x3x3x congruent to 333 modulo 666 does not imply that xxx is congruent to 111 modulo 666, as shown by
    _____
    .
    Hint

    Substitute this value into the original congruence and compare it with the proposed conclusion.

    Answer

    x=3x=3x=3

    Explanation

    For x=3x=3x=3, 3x=93x=93x=9 is congruent to 333 modulo 666, but 333 is not congruent to 111 modulo 666.

  44. 44
    A multiplicative inverse of xxx modulo nnn is a number whose product with xxx is congruent to
    _____
    modulo nnn.
    Hint

    It plays the role of the number that multiplication by xxx should produce when undoing multiplication.

    Answer

    111

    Explanation

    A number bbb is an inverse of xxx modulo nnn when xbxbxb is congruent to 111 modulo nnn.

  45. 45
    Modulo 555, the multiplicative inverse of 333 is
    _____
    .
    Hint

    Multiply 333 by a small integer and check whether the result is congruent to 111 modulo 555.

    Answer

    222

    Explanation

    3⋅2=63\cdot2=63⋅2=6, and 666 is congruent to 111 modulo 555, so 222 is an inverse of 333.

  46. 46
    An integer aaa has a multiplicative inverse modulo nnn if and only if gcd⁡(a,n)\gcd(a,n)gcd(a,n) equals
    _____
    .
    Hint

    The condition says that aaa and the modulus are relatively prime.

    Answer

    111

    Explanation

    An inverse exists exactly when 111 is an integer linear combination of aaa and nnn, which occurs if and only if their greatest common divisor is 111.

  47. 47
    If aaa has an inverse modulo nnn, then there are integers bbb and qqq satisfying $ab-qn=
    _____
    $.
    Hint

    Rewrite the congruence ababab congruent to 111 modulo nnn using divisibility.

    Answer

    111

    Explanation

    The inverse condition means that nnn divides ab−1ab-1ab−1, so ab−1=qnab-1=qnab−1=qn for some integer qqq, or equivalently ab−qn=1ab-qn=1ab−qn=1 after adjusting the sign of qqq.

  48. 48
    The congruence 3x3x3x congruent to 333 modulo 666 cannot be solved by multiplying by an inverse of 333, because 333 and 666 have greatest common divisor
    _____
    .
    Hint

    The coefficient and modulus are not relatively prime.

    Answer

    333

    Explanation

    Since gcd⁡(3,6)=3\gcd(3,6)=3gcd(3,6)=3, the coefficient 333 has no multiplicative inverse modulo 666.

  49. 49
    In 7x7x7x congruent to 141414 modulo 303030, division by 777 is allowed because $\gcd(7,30)=
    _____
    $.
    Hint

    Check whether the coefficient and modulus are relatively prime.

    Answer

    111

    Explanation

    Because 777 and 303030 are coprime, 777 has a multiplicative inverse modulo 303030, allowing the congruence to be solved by multiplying by that inverse.

  50. 50
    A multiplicative inverse of 777 modulo 303030 is
    _____
    .
    Hint

    Multiply 777 by the candidate and check the remainder modulo 303030.

    Answer

    131313

    Explanation

    7⋅13=917\cdot13=917⋅13=91, and 919191 is congruent to 111 modulo 303030, so 131313 is an inverse of 777.

  51. 51
    Using the inverse of 777 modulo 303030, the solution to 7x7x7x congruent to 141414 modulo 303030 is xxx congruent to
    _____
    modulo 303030.
    Hint

    Multiplying both sides by the inverse 131313 gives the result.

    Answer

    222

    Explanation

    Multiplying by 131313 gives xxx congruent to 13⋅14=18213\cdot14=18213⋅14=182, which is congruent to 222 modulo 303030.

  52. 52
    Fermat's Little Theorem applies when the modulus ppp is
    _____
    .
    Hint

    The theorem's name includes a special type of positive integer.

    Answer

    prime

    Explanation

    Fermat's Little Theorem requires that the modulus ppp be prime.

  53. 53
    If ppp is prime and aaa is not divisible by ppp, Fermat's Little Theorem says that ap−1a^{p-1}ap−1 is congruent to
    _____
    modulo ppp.
    Hint

    The theorem gives a particularly simple remainder for this power.

    Answer

    111

    Explanation

    For prime ppp and aaa not congruent to 000 modulo ppp, Fermat's Little Theorem states ap−1≡1(modp)a^{p-1}\equiv1\pmod pap−1≡1(modp).

  54. 54
    The condition that aaa is not a multiple of the prime ppp is needed because if aaa is congruent to 000 modulo ppp, then ap−1a^{p-1}ap−1 is also congruent to
    _____
    .
    Hint

    A positive power of a number divisible by the modulus remains divisible by it.

    Answer

    000

    Explanation

    If aaa is congruent to 000 modulo ppp, then its positive powers are also congruent to 000, not 111.

  55. 55
    In the proof of Fermat's Little Theorem, the values a,2a,…,(p−1)aa,2a,\ldots,(p-1)aa,2a,…,(p−1)a are all nonzero modulo ppp because ppp divides neither aaa nor any coefficient from 111 through
    _____
    .
    Hint

    The coefficients range over all positive integers below the prime.

    Answer

    p−1p-1p−1

    Explanation

    Since none of the coefficients 1,2,…,p−11,2,\ldots,p-11,2,…,p−1 is divisible by ppp, and aaa is not divisible by ppp, primality implies none of the products is divisible by ppp.

  56. 56
    The products a,2a,…,(p−1)aa,2a,\ldots,(p-1)aa,2a,…,(p−1)a are distinct modulo ppp because aaa has a multiplicative inverse modulo
    _____
    .
    Hint

    The inverse exists because aaa is not divisible by the prime modulus.

    Answer

    ppp

    Explanation

    If iaiaia and jajaja were congruent modulo ppp, multiplying by the inverse of aaa would show iii and jjj are congruent; since both are between 111 and p−1p-1p−1, they must be equal.

  57. 57
    The product of the integers from 111 through p−1p-1p−1 is denoted
    _____
    .
    Hint

    This is the factorial of the largest integer in that range.

    Answer

    (p−1)!(p-1)!(p−1)!

    Explanation

    By definition, (p−1)!=1⋅2⋯(p−1)(p-1)! = 1\cdot2\cdots(p-1)(p−1)!=1⋅2⋯(p−1).

  58. 58
    Multiplying the residues a,2a,…,(p−1)aa,2a,\ldots,(p-1)aa,2a,…,(p−1)a produces ap−1a^{p-1}ap−1 times
    _____
    .
    Hint

    There is one factor of aaa for each of the p−1p-1p−1 terms.

    Answer

    (p−1)!(p-1)!(p−1)!

    Explanation

    Their product is (a)(2a)⋯((p−1)a)=ap−1(p−1)!(a)(2a)\cdots((p-1)a)=a^{p-1}(p-1)!(a)(2a)⋯((p−1)a)=ap−1(p−1)!.

  59. 59
    The factorial (p−1)!(p-1)!(p−1)! can be canceled modulo ppp because none of its factors is divisible by ppp, so it has a multiplicative
    _____
    .
    Hint

    Cancellation modulo a number requires the factor being canceled to be invertible.

    Answer

    inverse

    Explanation

    Every factor from 111 to p−1p-1p−1 is coprime to prime ppp, so their product is also coprime to ppp and has an inverse modulo ppp.

  60. 60
    When the modulus ppp is prime and the base is not divisible by ppp, exponents can be reduced modulo
    _____
    using Fermat's Little Theorem.
    Hint

    This is one less than the prime modulus.

    Answer

    p−1p-1p−1

    Explanation

    Since ap−1a^{p-1}ap−1 is congruent to 111 modulo ppp, removing multiples of p−1p-1p−1 from a positive exponent preserves the result for a base not divisible by ppp.

  61. 61
    To reduce the exponent in 7957^{95}795 modulo 131313 using Fermat's Little Theorem, reduce 959595 modulo
    _____
    .
    Hint

    Use one less than the prime modulus.

    Answer

    121212

    Explanation

    Since 131313 is prime, exponents for a base not divisible by 131313 can be reduced modulo 13−1=1213-1=1213−1=12.

  62. 62
    The exponent 959595 is congruent to
    _____
    modulo 121212.
    Hint

    Subtract the largest multiple of 121212 that does not exceed 959595.

    Answer

    111111

    Explanation

    95=7⋅12+1195=7\cdot12+1195=7⋅12+11, so its remainder modulo 121212 is 111111.

  63. 63
    Modulo 131313, the inverse of 777 is
    _____
    .
    Hint

    Check which small number multiplied by 777 gives a remainder of 111 modulo 131313.

    Answer

    222

    Explanation

    7⋅2=147\cdot2=147⋅2=14, which is congruent to 111 modulo 131313; therefore 222 is the inverse of 777.

1 of 63
Question 1 of 63

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent