Modular Arithmetic
- 63Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
63 questions
- 1Bézout's identity states that for integers a and b, their greatest common divisor can be written as_____.
Hint
Think of a linear combination of the two integers.
Answer
as+bt for some integers s and t
Explanation
Bézout's identity says that there exist integers s and t such that gcd(a,b)=as+bt.
- 2The 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 s and t expressing gcd(a,b) as as+bt.
- 3An integer can be written as a linear combination of a and b if and only if it is divisible by_____.
Hint
This is the greatest common divisor criterion for linear combinations.
Answer
gcd(a,b)
Explanation
The integers expressible as linear combinations of a and b are exactly the multiples of their greatest common divisor.
- 4When working modulo n, computations focus on remainders and disregard_____.
Hint
These are the parts that do not affect the remainder after division by n.
Answer
multiples of n
Explanation
Numbers that differ by a multiple of n have the same remainder modulo n.
- 5Whether 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
2
Explanation
Modulo 2, an even integer has remainder 0 and an odd integer has remainder 1.
- 6The last digit of an integer is determined by its remainder modulo_____.
Hint
The decimal numeral system has this many digits.
Answer
10
Explanation
Two integers with the same remainder modulo 10 have the same last digit.
- 7Because 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.
- 8The repeating cycle of days in a week means that day calculations can be done modulo_____.
Hint
A week contains this many days.
Answer
7
Explanation
A shift by any multiple of 7 days returns to the same day of the week, so only the remainder modulo 7 matters.
- 9The lecture noted that clock-hour calculations may use modulus 12 or_____depending on whether AM or PM matters.
Hint
This modulus corresponds to a full day.
Answer
24
Explanation
A clock may repeat every 12 hours, while a full day consists of 24 hours.
- 10The familiar fact that an even integer plus an odd integer is_____illustrates a calculation modulo 2.
Hint
Add the remainders 0 and 1 modulo 2.
Answer
odd
Explanation
An even integer has remainder 0 modulo 2 and an odd integer has remainder 1, so their sum has remainder 1 and is odd.
- 11a is congruent to b modulo n precisely when n_____a−b.
Hint
Use the definition of congruence in terms of the difference.
Answer
divides
Explanation
By definition, a and b are congruent modulo n if and only if a−b is a multiple of n.
- 12Modulo 5, the integers 17 and 12 are congruent because their difference is_____.
Hint
Subtract the two integers and check whether the result is divisible by the modulus.
Answer
5
Explanation
Since 17−12=5 and 5 divides 5, the integers are congruent modulo 5.
- 13Modulo 5, the integers 17 and 33 are not congruent because their difference is not a_____of 5.
Hint
Check whether 17−33 can be divided evenly by 5.
Answer
multiple
Explanation
Their difference is −16, which is not a multiple of 5, so they are not congruent modulo 5.
- 14The congruence class of 0 modulo 5 contains all integers of the form_____.
Hint
Every member differs from 0 by a multiple of 5.
Answer
5q for an integer q
Explanation
The class consists of all multiples of 5, including 0, positive multiples, and negative multiples.
- 15The congruence class of 1 modulo 5 includes 1, 6, 11, −4, and_____.
Hint
Each listed integer differs from 1 by a multiple of 5.
Answer
−9
Explanation
The integer −9 differs from 1 by −10, a multiple of 5, so it belongs to the same congruence class.
- 16To identify the congruence class of an integer modulo n, divide it by n and use the_____.
Hint
It is the part left over after division.
Answer
remainder
Explanation
Every integer is congruent modulo n to its remainder upon division by n.
- 17If k=5q+r with 0≤r<5, then the congruence class of k modulo 5 is represented by_____.
Hint
The division theorem identifies the representative in the standard range.
Answer
r
Explanation
The quotient term 5q is a multiple of 5, so k and r are congruent modulo 5.
- 18For modulus n, the standard representatives of all congruence classes are the integers from 0 through_____.
Hint
These are exactly the possible nonnegative remainders upon division by n.
Answer
n−1
Explanation
The possible remainders are 0,1,…,n−1, giving n distinct congruence classes.
- 19The congruence classes modulo n 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 n, so the classes partition the integers.
- 20Two integers are congruent modulo n if and only if they have the same_____when divided by n.
Hint
This is the remainder characterization of congruence.
Answer
remainder
Explanation
Equal remainders imply that the difference is divisible by n, and a difference divisible by n implies equal remainders.
- 21The division theorem requires a positive divisor d and gives integers q and r such that n=qd+r with_____.
Hint
The remainder lies in a range starting at zero and ending just below the divisor.
Answer
0≤r<d
Explanation
For every integer n and positive integer d, the division theorem gives n=qd+r with 0≤r<d.
- 22For fixed n and positive d, the quotient and remainder in n=qd+r are_____.
Hint
The division theorem guarantees exactly one valid pair.
Answer
unique
Explanation
There is exactly one pair of integers (q,r) satisfying n=qd+r and 0≤r<d.
- 23In the division theorem, q is called the_____.
Hint
It counts how many full groups of size d fit into the division.
Answer
quotient
Explanation
In n=qd+r, the integer q is the quotient and r is the remainder.
- 24In the division theorem, r is called the_____.
Hint
It is the amount left after taking out full multiples of the divisor.
Answer
remainder
Explanation
In n=qd+r, the integer r is the remainder, constrained by 0≤r<d.
- 25The lecture also called the remainder the_____of a number modulo n.
Hint
This term describes the representative left after reducing modulo the modulus.
Answer
residue
Explanation
A number is equivalent modulo n to its remainder, which can also be called its residue.
- 26The notation div(n,d) refers to the_____in the division theorem.
Hint
It corresponds to q in n=qd+r.
Answer
quotient
Explanation
The lecture used div(n,d), or infix ndivd, to denote the quotient.
- 27The notation rem(n,d) refers to the_____in the division theorem.
Hint
It corresponds to r in n=qd+r.
Answer
remainder
Explanation
The lecture used rem(n,d), or infix nremd, to denote the remainder.
- 28In 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.
- 29The lecture warned that the expression “a mod n” 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 n is a relation between numbers, whereas a mod operation may denote the remainder produced by a function.
- 30If a is congruent to b modulo n, then adding the same c preserves congruence: a+c is congruent to_____modulo n.
Hint
Add the same quantity to both representatives.
Answer
b+c
Explanation
Replacing a number by a congruent one preserves the result of addition modulo n.
- 31If a is congruent to b modulo n, subtracting the same c gives a−c congruent to_____modulo n.
Hint
Apply the same subtraction to both sides of the congruence.
Answer
b−c
Explanation
Congruent values remain congruent when the same quantity is subtracted from each.
- 32If a is congruent to b modulo n, then subtracting each from the same c gives c−a congruent to_____modulo n.
Hint
The shared quantity appears first in both differences.
Answer
c−b
Explanation
The difference (c−a)−(c−b)=b−a is a multiple of n, so the two expressions are congruent.
- 33If a is congruent to b modulo n, multiplying both by c gives ac congruent to_____modulo n.
Hint
Multiplication by the same integer preserves congruence.
Answer
bc
Explanation
Since n divides a−b, it also divides c(a−b)=ac−bc.
- 34For a positive integer exponent c, congruent bases have congruent powers: if a is congruent to b modulo n, then ac is congruent to_____modulo n.
Hint
Repeated multiplication allows the base to be replaced at each step.
Answer
bc
Explanation
The claim follows by induction on c, using preservation of congruence under multiplication.
- 35The induction proof for congruent bases begins with exponent c=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−1, multiply by the congruent bases and use the multiplication property to prove it for c.
- 36Even if a and b are congruent modulo n, one cannot generally replace the_____in ca and cb.
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.
- 37Modulo 5, (−1)1 and (−1)6 provide a counterexample to replacing congruent_____in an exponent.
Hint
The exponents 1 and 6 are congruent modulo 5, but the powers differ modulo 5.
Answer
exponents
Explanation
(−1)1=−1 while (−1)6=1, and these are not congruent modulo 5.
- 38When computing modulo 100, 11335 can be replaced by_____.
Hint
Only the last two digits determine the remainder modulo 100.
Answer
35
Explanation
11335 and 35 differ by 11300, a multiple of 100, so they are congruent modulo 100.
- 39When computing modulo 100, 7799 can be replaced by_____.
Hint
Compare 7799 with the closest convenient multiple of 100.
Answer
−1
Explanation
7799 differs from −1 by 7800, a multiple of 100, so they are congruent modulo 100.
- 40Modulo 100, the powers of 35 with even exponent greater than zero have remainder_____.
Hint
Start with 352 and observe the remainder when squaring the remainder.
Answer
25
Explanation
352 is congruent to 25 modulo 100, and 252 is also congruent to 25, so subsequent positive even powers have remainder 25.
- 41Modulo 100, powers of 35 with odd exponent greater than one have remainder_____.
Hint
Multiply the even-power remainder by 35.
Answer
75
Explanation
An odd power greater than one is congruent to 25⋅35=875, whose remainder modulo 100 is 75.
- 42Because there are only 100 possible residues modulo 100, a sufficiently long sequence of powers must eventually_____.
Hint
Apply the pigeonhole principle to the possible remainders.
Answer
repeat
Explanation
Among more than 100 powers, at least two must have the same residue; the sequence then eventually repeats, though the cycle need not be short.
- 43The congruence 3x congruent to 3 modulo 6 does not imply that x is congruent to 1 modulo 6, as shown by_____.
Hint
Substitute this value into the original congruence and compare it with the proposed conclusion.
Answer
x=3
Explanation
For x=3, 3x=9 is congruent to 3 modulo 6, but 3 is not congruent to 1 modulo 6.
- 44A multiplicative inverse of x modulo n is a number whose product with x is congruent to_____modulo n.
Hint
It plays the role of the number that multiplication by x should produce when undoing multiplication.
Answer
1
Explanation
A number b is an inverse of x modulo n when xb is congruent to 1 modulo n.
- 45Modulo 5, the multiplicative inverse of 3 is_____.
Hint
Multiply 3 by a small integer and check whether the result is congruent to 1 modulo 5.
Answer
2
Explanation
3⋅2=6, and 6 is congruent to 1 modulo 5, so 2 is an inverse of 3.
- 46An integer a has a multiplicative inverse modulo n if and only if gcd(a,n) equals_____.
Hint
The condition says that a and the modulus are relatively prime.
Answer
1
Explanation
An inverse exists exactly when 1 is an integer linear combination of a and n, which occurs if and only if their greatest common divisor is 1.
- 47If a has an inverse modulo n, then there are integers b and q satisfying $ab-qn=_____$.
Hint
Rewrite the congruence ab congruent to 1 modulo n using divisibility.
Answer
1
Explanation
The inverse condition means that n divides ab−1, so ab−1=qn for some integer q, or equivalently ab−qn=1 after adjusting the sign of q.
- 48The congruence 3x congruent to 3 modulo 6 cannot be solved by multiplying by an inverse of 3, because 3 and 6 have greatest common divisor_____.
Hint
The coefficient and modulus are not relatively prime.
Answer
3
Explanation
Since gcd(3,6)=3, the coefficient 3 has no multiplicative inverse modulo 6.
- 49In 7x congruent to 14 modulo 30, division by 7 is allowed because $\gcd(7,30)=_____$.
Hint
Check whether the coefficient and modulus are relatively prime.
Answer
1
Explanation
Because 7 and 30 are coprime, 7 has a multiplicative inverse modulo 30, allowing the congruence to be solved by multiplying by that inverse.
- 50A multiplicative inverse of 7 modulo 30 is_____.
Hint
Multiply 7 by the candidate and check the remainder modulo 30.
Answer
13
Explanation
7⋅13=91, and 91 is congruent to 1 modulo 30, so 13 is an inverse of 7.
- 51Using the inverse of 7 modulo 30, the solution to 7x congruent to 14 modulo 30 is x congruent to_____modulo 30.
Hint
Multiplying both sides by the inverse 13 gives the result.
Answer
2
Explanation
Multiplying by 13 gives x congruent to 13⋅14=182, which is congruent to 2 modulo 30.
- 52Fermat's Little Theorem applies when the modulus p is_____.
Hint
The theorem's name includes a special type of positive integer.
Answer
prime
Explanation
Fermat's Little Theorem requires that the modulus p be prime.
- 53If p is prime and a is not divisible by p, Fermat's Little Theorem says that ap−1 is congruent to_____modulo p.
Hint
The theorem gives a particularly simple remainder for this power.
Answer
1
Explanation
For prime p and a not congruent to 0 modulo p, Fermat's Little Theorem states ap−1≡1(modp).
- 54The condition that a is not a multiple of the prime p is needed because if a is congruent to 0 modulo p, then ap−1 is also congruent to_____.
Hint
A positive power of a number divisible by the modulus remains divisible by it.
Answer
0
Explanation
If a is congruent to 0 modulo p, then its positive powers are also congruent to 0, not 1.
- 55In the proof of Fermat's Little Theorem, the values a,2a,…,(p−1)a are all nonzero modulo p because p divides neither a nor any coefficient from 1 through_____.
Hint
The coefficients range over all positive integers below the prime.
Answer
p−1
Explanation
Since none of the coefficients 1,2,…,p−1 is divisible by p, and a is not divisible by p, primality implies none of the products is divisible by p.
- 56The products a,2a,…,(p−1)a are distinct modulo p because a has a multiplicative inverse modulo_____.
Hint
The inverse exists because a is not divisible by the prime modulus.
Answer
p
Explanation
If ia and ja were congruent modulo p, multiplying by the inverse of a would show i and j are congruent; since both are between 1 and p−1, they must be equal.
- 57The product of the integers from 1 through p−1 is denoted_____.
Hint
This is the factorial of the largest integer in that range.
Answer
(p−1)!
Explanation
By definition, (p−1)!=1⋅2⋯(p−1).
- 58Multiplying the residues a,2a,…,(p−1)a produces ap−1 times_____.
Hint
There is one factor of a for each of the p−1 terms.
Answer
(p−1)!
Explanation
Their product is (a)(2a)⋯((p−1)a)=ap−1(p−1)!.
- 59The factorial (p−1)! can be canceled modulo p because none of its factors is divisible by p, so it has a multiplicative_____.
Hint
Cancellation modulo a number requires the factor being canceled to be invertible.
Answer
inverse
Explanation
Every factor from 1 to p−1 is coprime to prime p, so their product is also coprime to p and has an inverse modulo p.
- 60When the modulus p is prime and the base is not divisible by p, exponents can be reduced modulo_____using Fermat's Little Theorem.
Hint
This is one less than the prime modulus.
Answer
p−1
Explanation
Since ap−1 is congruent to 1 modulo p, removing multiples of p−1 from a positive exponent preserves the result for a base not divisible by p.
- 61To reduce the exponent in 795 modulo 13 using Fermat's Little Theorem, reduce 95 modulo_____.
Hint
Use one less than the prime modulus.
Answer
12
Explanation
Since 13 is prime, exponents for a base not divisible by 13 can be reduced modulo 13−1=12.
- 62The exponent 95 is congruent to_____modulo 12.
Hint
Subtract the largest multiple of 12 that does not exceed 95.
Answer
11
Explanation
95=7⋅12+11, so its remainder modulo 12 is 11.
- 63Modulo 13, the inverse of 7 is_____.
Hint
Check which small number multiplied by 7 gives a remainder of 1 modulo 13.
Answer
2
Explanation
7⋅2=14, which is congruent to 1 modulo 13; therefore 2 is the inverse of 7.

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