Modular Arithmetic
Sarvagya Gangwar
August 2024
1 Introduction
Modular arithmetic is a system of integer arithmetic where after a particular
value, the value traces back to the first one.
In simpler words, it is a world of integer arithmetic where instead of being
situated on a number line, the numbers are situated on a circle and every num-
ber corresponds to a number already situated on the circle.
Example: An analog clock is an example of a modular arithmetic system where
the value traces back to the first one after 12.
Clock is an example of a Modular Arithmetic system
2 Basic Terms
2.1 Modulo
The number at which the given value, reaches the number 0 on the circle.
Modulo can also be defined as the base value (> 0) corresponding to 0 on
the circle of numbers.
If we have two integers m1 and m2 then m1 modulo m2 , denoted by m1 (mod
m2 ) gives the remainder when m1 is divided by m2 . The value of modulo in
this case is m2 .
1
2.2 Congruence
Two integers k1 and k2 are said to be congruent to each other modulo k3 if the
difference k1 − k2 is divisible by k3 or k1 and k2 leave the same remainder when
divided by k3 .
It is denoted as:
k1 ≡ k2 (mod k3 )
The symbol of congruence is ’≡’ and when two numbers are not congruent the
symbol used is ’̸≡’.
Example: 3 and 18 leave the same remainder when divided by 5, hence we
can say 3 and 18 are congruent modulo 5.
3 ≡ 18 (mod 5)
2.3 Dividend, Divisor, Quotient, and Remainder
When we divide an integer a1 by another integer a2 , we always obtain a quotient
q and remainder r.
• Dividend: The integer being divided is called the dividend.
• Divisor: The integer that divides the dividend is called the divisor.
• Quotient: The integer obtained by dividing the closest multiple of the
divisor to the dividend not greater than it by the divisor is called the
quotient.
• Remainder: The integer obtained from the difference of the dividend
and the closest multiple of the divisor not greater than it, is called the
remainder.
0 ≤ |r| < d
where r and d represents remainder and divisor respectively
2.3.1 Euclidean’s Divison Lemma
The Euclidean’s Division states the relation between the dividend, divisor, quo-
tient, and remainder. It is as follows:
d1 = d2 · q + r
where d1 , d2 , q, and r represent dividend, divisor, quotient, and remainder re-
spectively.
Example: Find the Dividend(d1 ), Divisor(d2 ), Quotient(q), and Remainder(r)
when 23 is divided by 11 and write the equation using Euclid’s Division Lemma.
2
Solution: Dividend = 23 Divisor = 11 Quotient = 22/11=2 Remainder = 23 -
22 = 1
23 = 11 · 2 + 1
3 Basic Properties Of Congruence
• a ≡ a (mod b) (Reflexivity)
• If a1 ≡ a2 (mod b) then a2 ≡ a1 (mod b) (Symmetry)
• If a1 ≡ a2 (mod b), a2 ≡ a3 (mod b) then a2 ≡ a3 (mod b) (Transitivity)
• If a1 ≡ a2 (mod b) Then:
– a1 + n ≡ a2 + n (mod b) for any integer n
– a1 − n ≡ a2 − n (mod b) for any integer n
– a1 · n ≡ a2 · n (mod b) for any integer n
– a1 · n ≡ a2 · n (mod b · n) for any integer n
– an1 ≡ an2 (mod b) for any positive integer n
– f (a1 ) ≡ f (a2 ) (mod b) where f (x) is a polynomial with integer co-
efficients
• If a1 ≡ a2 (mod b) and c1 ≡ c2 (mod b), Then:
– a1 + c1 ≡ a2 + c2 (mod b) (It is the same as a1 + c2 ≡ a2 + c1 (mod b)
due to Symmetry)
– a1 − c1 ≡ a2 − c2 (mod b) (It is the same as a1 − c2 ≡ a2 − c1 (mod b)
due to Symmetry)
– a1 · c1 ≡ a2 · c2 (mod b) (It is the same as a1 · c2 ≡ a2 · c1 (mod b)
due to symmetry)
• If k · a1 ≡ k · a2 (mod b), Then a1 ≡ a2 (mod gcd(b,k)
b
).
Special cases: [k ̸= 0]
– If gcd(b, k) = 1 then k · a1 ≡ k · a2 (mod b)
= a1 ≡ a2 (mod b)
– If gcd(b, k) = k i.e. b = k · β then k · a1 ≡ k · a2 (mod (b = k · β))
= a1 ≡ a2 (mod β)
• Existence of Inverse Modulo: If gcd(α, γ) = 1, then there exists an integer
ρ such that α · ρ ≡ 1 (mod γ). This integer is the Inverse Modulo of α in
modulo γ.
3
– If α1 ≡ α2 (mod γ) then ρ1 ≡ ρ2 (mod γ)
– If α1 · x ≡ α2 (mod γ) Then the solution is given by x ≡ ρ1 · α2
(mod γ)
– Example:
Let α = 3 and γ = 40 gcd(α, γ) = 1
Then Inverse Modulo of α in this case would be 33+4k (k ∈ W)
3 · 33+0 = 34 ≡ 1 (mod 40)(k = 0)
3 · 33+4 = 38 ≡ 1 (mod 40)(k = 1)
3 · 33+8 = 312 ≡ 1 (mod 40)(k = 2)
.
.
.
and so on
Note: Remainders can also exist in the form of negative integers
Suppose two positive integers σ1 and σ2 . And σ1 ≡ µ (mod σ2 ) (0 ≤ µ <
σ2 )
Then the equation in the form of Euclid’s Division Lemma would be
σ1 = σ2 · α + µ
= σ2 · α + µ + σ2 − σ2
= σ2 (α + 1) − (σ2 − µ)
Let (σ2 − µ) = β
σ1 = σ2 (α + 1) − β
Remainder = −β
σ1 ≡ −β (mod σ2 )
4
4 Important Theorems
4.1 Fermat’s Little Theorem:
4.1.1 Theorem
It states that If p is a prime number and a is any integer such that p ∤ a, then
ap−1 ≡ 1 (mod p)
4.1.2 Proof:
Suppose an integer a and a prime number p such that p ∤ a. Consider a set M
of (p − 1) elements, M = {a, 2a, 3a...(p − 1)a} and another set M’ of (p − 1)
elements, M’ = {1, 2, 3...(p-1)}
Claim: Every element of M corresponds to a different element M’ and no
two elements correspond to the same element.
Proof: Take any two elements of M, suppose na and ma (1 ≤ n ̸= m < p) such
that na ≡ ma (mod p) So,
p|na − ma = p|a(n − m)
Two cases: p divides either i) a or ii) (n-m)
i) p divides a: This is not possible as stated before p ∤ a
ii) p divides (n-m):
Maximum value of (n-m) = (p-1) - (1) = p - 1 - 1 = p - 2
Minimum value of (n-m) = (1) - (p - 1) = 1 - p + 1 = 2 - p
(n-m) lies in the interval [2 - p, p - 2]
There is only one multiple of p that lies in this interval i.e.0
n − m = 0 = n = m; This is not possible because as stated before n ̸= m
Hence, the Claim is true
To write in a different way:
k Element of M ≡ k ′ element of M’ (mod p)
Now, take the product of every possible k which would be congruent to the
product of very possible k ′
a · 2a · 3a · ... · (p − 1)a ≡ 1 · 2 · 3 · ... · (p − 1) (mod p)
= ap−1 · (p − 1)! ≡ (p − 1)! (mod p)
(p-1)! can be canceled out from both sides as gcd((p − 1)!, p) = 1
ap−1 ≡ 1 (mod p)
Hence Proved
5
4.1.3 Corollary:
It states that any integer a and prime number p have the following relation:
ap ≡ a (mod p)
Proof:
There are two cases:
i) p ∤ a ii) p|a
i) This is a direct result of Fermat’s Little theorem
ap−1 ≡ 1 (mod p)
Multiply both sides by a
= ap ≡ a (mod p)
ii) Let a be equal to p · q (q ∈ Z+ )
pq ≡ 0 (mod p)
Raise both sides by a power of (p)
pq p ≡ 0p (mod p)
p
= pq ≡ 0 (mod p)
= ap ≡ 0 (mod p)
[a ≡ 0 (mod p)]
Hence Proved
4.1.4 Example:
Find the remainder when 2304 is divided by 7
Solution: As 7 is prime and 7 ∤ 2
27−1 ≡ 1 (mod 7) → 26 ≡ 1 (mod 7)
(26 )50 ≡ 150 (mod 7) → 2300 ≡ 150 (mod 7)
24 · 2300 ≡ 24 · 150 (mod 7) → 2304 ≡ 24 (mod 7)
2304 ≡ 16 (mod 7) → 2304 ≡ 2 (mod 7)
6
4.2 Euler’s Theorem
4.2.1 Euler’s Totient Function (ETF):
Definition:
The Euler’s Totient Function is defined as the number of integers lesser than or
equal to n that are relatively prime to n where n is any positive integer. But as
n can never be relatively prime with itself, the bounds can be reduced to lesser
than n. It is denoted using ϕ(n).
Properties:
• ϕ(n) always lies in the interval [1, (n − 1)]
• If p is a prime number, then ϕ(p) = (p − 1)
• If gcd(α, β) = d, then ϕ(α · β) = ϕ(α) · ϕ(β) · d/ϕ(d)
– If gcd(α, β) = 1, then ϕ(α · β) = ϕ(α) · ϕ(β)
• If p is a prime number and k is any integer such k ≥ 1, then
ϕ(pk ) = pk − pk−1
As there are exactly pk−1 numbers divisible by p in the interval [1, pk ]
Formula:
If a positive integer ρ = p1 a1 · p2 a2 · p3 a3 · ... · pk ak , then
1 1 1 1
ϕ(ρ) = ρ · 1 − · 1− · 1− · ... · 1 −
p1 p2 p3 pk
Proof:
Suppose a positive integer γ such that γ = pσ1 1 · pσ2 2 · ... · pσk k
To prove: ϕ(γ) = (γ) · 1 − p11 · 1 − p12 · 1 − p13 · ... · 1 − 1
pk
ϕ(γ) = ϕ(pσ1 1 )·ϕ(pσ2 2 )·...·ϕ(pσk k ) [If gcd(m, n) = 1, ϕ(m·n) = ϕ(m)·ϕ(n)]
= (pσ1 1 −pσ1 1 −1 )·(pσ2 2 −pσ2 2 −1 )·(pσ3 3 −pσ3 3 −1 )·...·(pσk k −pσk k −1 ) [ϕ(pk ) = pk −pk−1 ]
= pσ1 1 1 − p11 · pσ2 2 1 − p12 · pσ3 3 1 − p13 · ... · pσk k 1 − p1k
= (pσ1 1 · pσ2 2 · pσ3 3 · ... · pσk k ) · 1 − p11 · 1 − p12 · 1 − p13 · ... · 1 − p1k
= (γ) · 1 − p11 · 1 − p12 · 1 − p13 · ... · 1 − p1k [γ = pσ1 1 · pσ2 2 · ... · pσk k ]
1 1 1 1
ϕ(γ) = (γ) · 1 − · 1− · 1− · ... · 1 −
p1 p2 p3 pk
Hence Proved
7
4.2.2 Theorem:
It states that if n is a positive integer and α is another positive integer relatively
prime to n, then
nϕ(α) ≡ 1 (mod α)
4.2.3 Proof :
Consider a set M, such that
M = {1 ≤ xi < α : gcd(xi , α) = 1} [xi , α ∈ N]
The cardinality of M = ϕ(α)
Suppose M = {x1 , x2 , x3 , ..., xϕ(α) }
Consider another set M’,
M’ = {δ ·x1 , δ ·x2 , δ ·x3 , ..., δ ·xϕ(α) } [gcd(δ, α) = 1]
Claim 1: No two elements of set M leave the same remainder when divided
by α.
Claim 2: Each element of set M’ is coprime to α or gcd(δxi , α) = 1.
Claim 3: No two elements of set M’ leave the same remainder when divided by α.
Proof 1: Take any two elements of M, xi and xj such that xi ≡ xj (mod α).
xi ≡ xj (mod α)
=⇒ α|(xi − xj )
Range of (xi − xj ) = M in(xi − xj ), M ax(xi − xj )
Minimum value of (xi − xj ) = M in(xi ) − M ax(xj )
= 1 − (α − 1) = 1 − α + 1 = 2 − α
Maximum value of (xi - xj ) = Max(xi ) - Min(xj )
= (α − 1) − 1 = α − 1 − 1 = α − 2
Range of (xi − xj ) = {(2 − α), (α − 2)}
There is only one multiple of α in the range of (xi − xj ) i.e. 0
So, (xi − xj ) = 0 because as stated before α|(xi − xj )
(xi − xj ) = 0
=⇒ xi = xj
So, This only happens when xi = xj . Hence, no two elements of M leave the
same remainder when divided by α.
8
Hence, the Claim is true.
Proof 2: Suppose there is a prime p such that p|δxi and p|α
Then there are two cases
i) p|δ and p|α
ii)p|xi and p|α
i) p|δ and p|α:
If this is true, that means gcd(δ, α) = p, but it contradicts the fact that
gcd(δ, α) = 1. Hence this is not possible.
ii) If this is true, that means gcd(xi , α) = p but it contradicts the fact that
gcd(xi , α) = 1. Hence this is also not possible.
Hence, the Claim is true.
Proof 3: Take any two elements of M’, δxi and δxj such that δxi ≡ δxj (mod α).
δxi ≡ δxj (mod α)
=⇒ α|δ(xi − xj )
Range of δ(xi − xj ) = {Min[δ(xi − xj )], M ax[δ(xi − xj )]}
Minimum value of δ(xi − xj ) = δ[M in(xi ) − M ax(xj )]
= δ[1 − (α − 1)] = δ[1 − α + 1] = δ(2 − α)
Maximum value of δ(xi - xj ) = δ(Max(xi ) - Min(xj ))
= δ[(α − 1) − 1] = δ[α − 1 − 1] = δ(α − 2)
Range of (xi − xj ) = {δ(2 − α), δ(α − 2)}
As gcd(δ, α) = 1, α|(xi , xj )
Range of (xi − xj ) = {(2 − α), (α − 2)}
There is only one multiple of α in the range of (xi − xj ) =⇒ 0
xi − xj = 0
=⇒ xi = xj
So, α|δ(xi − xj ) only when xi = xj
Hence, the Claim is true
M’ (mod α) is a permutation of the elements of set M {x1 , x2 , ..., xϕ(α) }
That is because M is a set of all positive integers, less than α coprime to α.
And the cardinality of M = ϕ(α).
And M’ (mod α) is also a set of all positive integers less than α coprime to α.
9
And the cardinality of M’ = ϕ(α).
Hence we can say:
M′ ≡ M (mod α)
=⇒ δx1 · δx2 · δx3 · ... · δxϕ(α) ≡ x1 · x2 · x3 · ... · xϕ(α) (mod α)
= δ ϕ(α) · (x1 · x2 · x3 · · · xϕ(α) ) ≡ (x1 · x2 · x3 · · · xϕ(α) ) (mod α)
As (x1 · x2 · x3 · · · xϕ(α) ) is coprime to α, it can be canceled out.
= δ ϕ(α) ≡ 1 (mod α)
Hence Proved
4.2.4 Example:
117!
Find the remainder when 35 is divided by 19
Solution: By Fermat’s Little, we have 318 ≡ 1 (mod
19)
ϕ(18) = 18 · 1 − 12 · 1 − 13 = 18 · 12 · 23 → ϕ(18) = 6
By Euler’s Theorem, we have 56 ≡ 1 (mod 18)
11 ≡ −1 (mod 6) → 117! ≡ (−1)7! (mod 6) → 117! ≡ 1 (mod 6)
7!
So, 117! = 6α + 1 → 511 = 56α·1 = 56α · 51
7! 7!
511 ≡ 5 (mod 18) → 511 = 18β + 5
117!
35 = 318β+1 = 318β · 35
18β
3 · 35 (mod 19) → 1 · 243 (mod 19)
243 ≡ 15 (mod 19)
Hence, the answer is 15.
4.3 Chinese Remainder Theorem
4.3.1 Theorem:
Suppose (ω1 , ω2 , ω3 , ..., ωk ) ∈ N such that they are pairwise prime. And (ζ1 , ζ2 , ζ3 , ..., ζk ) ∈
Z, such that,
τ ≡ ζ1 (mod ω1 )
τ ≡ ζ2 (mod ω2 )
τ ≡ ζ3 (mod ω3 )
.
.
.
τ ≡ ζk (mod ωk )
Then this system has a unique solution modulo ω1 · ω2 · ω3 · . . . · ωk
10
4.3.2 Proof:
Let ω1 , ω2 , . . . , ωk be pairwise coprime positive integers, and let λ = ω1 · ω2 ·
· . . . · ωk . We want to show that for any integers ζ1 , ζ2 , . . . , ζk , there exists a
unique integer τ such that:
τ ≡ ζi (mod ωi ) ∀ i ∈ N
Existence:
For each i = 1, 2, . . . , k, let λi = ωλi . Since ωi and λi are coprime, there
exists an integer ηi such that λi ηi ≡ 1 (mod ωi ). Now, define:
τ = ζ1 λ1 η1 + ζ2 λ2 η2 + . . . + ζk λk ηk
We claim that this τ satisfies the given congruences. Indeed, for any i =
1, 2, . . . , k, we have:
τ ≡ ζi λi ηi ≡ ζi · 1 ≡ ζi (mod ωi )
Thus, τ is a solution to the system of congruences.
Uniqueness:
Suppose there are two solutions τ1 and τ2 . Then, τ1 − τ2 ≡ 0 (mod ωi ) for
all i = 1, 2, . . . , k. This implies that ωi divides τ1 − τ2 for all i. Since the ωi
are pairwise coprime, their least common multiple, which is λ, must also divide
τ1 − τ2 . Therefore, τ1 ≡ τ2 (mod λ), and the solution is unique.
Hence Proved
4.3.3 Example:
Find the smallest positive integer value of n such that
n≡4 (mod 5)
n≡3 (mod 6)
n≡2 (mod 7)
Solution: m1 = 5, m2 = 6 and m3 = 7
Let m1 · m2 · m3 = M = 5 · 6 · 7 → M = 210
M
Suppose Mi = m i
→ M1 = 42, M2 = 35 and M3 = 30
11
M1 ≡ 2 (mod 5) → M1′ ≡ 3 (mod 5) [Mi · Mi′ ≡ 1 (mod mi )]
M2 ≡ 5 (mod 6) → M2′ ≡ 5 (mod 6)
M3 ≡ 2 (mod 7) → M3′ ≡ 4 (mod 7)
nj ≡ 4 · M1 · M1′ + 3 · M2 · M2′ + 2 · M3 · M3′ (mod M )
nj ≡ 4 · 42 · 3 + 3 · 35 · 5 + 2 · 30 · 4 (mod 2)10
nj ≡ 504 + 315 + 240 (mod 2)10 → n0 ≡ 1059 (mod 2)10
nj ≡ 9 (mod 2)10 → nj = 210k + 9
The smallest positive integer would be obtained when k = 0. Hence the smallest
positive integer that satisfies this system of congruences is 210 · 0 + 9 = 0 + 9 = 9
4.4 Wilson’s Theorem
4.4.1 Theorem:
For any prime number p, it follows:
(p − 1)! ≡ −1 (mod p)
4.4.2 Proof:
If p = 2,
1! ≡ −1 (mod 2) holds true
If p = 3,
2! ≡ −1 (mod 3) holds true
This is for p ≥ 5:
Lemma: If κ2 ≡ 1 (mod p) [p is a prime]
then, κ ≡ 1 (mod p) or κ ≡ −1 (mod p)
Proof: Suppose a positive integer κ such that κ2 ≡ 1 (mod p) [p is a prime]
=⇒ p|κ2 − 1 =⇒ p|(κ − 1)(κ + 1)
This means either p|(κ − 1) or p|(κ + 1)
=⇒ κ ≡ 1 (mod p) or κ ≡ −1 (mod p)
Hence proved
This implies that there are only two numbers that are multiplicative inverses of
themselves i.e. 1 and −1
(p − 1)! ≡ 1 · 2 · 3 · · · (p − 2) · (p − 1) (mod p)
Let the modular inverse of a be denoted by a’.
Every number in the interval [2, (p-2)] {2, 3,. . . ,(p-2)}can be paired with its
unique modular inverse {2’, 3’,. . . ,(p-2)’} as every element is relatively prime
with p and p ̸≡ 1, −1 (mod p)
(p − 1)! ≡ 1 · (2 · 2′ ) · (3 · 3′ ) · · · ((p − 2) · (p − 2)′ ) · (p − 1) (mod p)
12
Note: It is possible that 2’ = 3 or 3 = (p-2)’. If it is like that, we can
switch the values, which will still not affect the whole motive.
It transforms the equation into this:
(p − 1)! ≡ 1 · 1| · 1{z· · · 1} ·(p − 1) (mod p)
(p−3)
2 −times
= (p − 1)! ≡ (p − 1) (mod p)
= (p − 1)! ≡ (−1) (mod p)
Hence proved
4.4.3 Example:
Find the remainder when 9! is divided by 11
Solution: As 11 is a prime number, by Wilson’s theorem we can say,
10! ≡ −1 (mod 11)
Now, add 11 on the RHS of the congruence (it will not affect the
congruence as 11 ≡ 0 (mod 11)).
10! ≡ −1 + 11 (mod 11)
= 10! ≡ 10 (mod 11)
= 10 · 9! ≡ 10 (mod 11)
Divide both sides of congruence by 10 (it will not affect the
congruence as gcd(10,11) = 1.
9! ≡ 1 (mod 11)
Hence, the answer is 1
5 Examples
Example 1:
Find the remainder when 9 × 99 × 999 × · · · × (99 . . . 999) is divided by 1000.
| {z }
999−times
Solution:
Notice that the remainder of any number when divided by 10n depends on the
last n digits. In this case n = 3, hence, the remainder depends only on the last
three digits.
13
9≡9 (mod 1000)
99 ≡ 99 (mod 1000)
999 ≡ −1 (mod 1000)
9999 ≡ −1 (mod 1000)
..
.
. . 999} ≡ −1
|99 . {z (mod 1000)
999−times
This transforms the equation into the following:
(9 × 99 × −1 × −1 × · · · × −1) (mod 1000)
| {z }
997−times
= (891 × (−1)997 ) (mod 1000)
= (891 × −1) (mod 1000)
= −891 (mod 1000)
= 109 (mod 1000)
Hence, the answer is 109.
Example 2:
Find the remainder when (1! + 2! + 3! . . .) is divided by 9. (n! = 1 · 2 · 3 · 4 · · · n).
Solution:
Claim: If n ≥ 6, then n! is always divisible by 9.
Proof: 6! = 1 × 2 × 3 × 4 × 5 × 6 → 6! = 1 × 2 × 3 × 22 × 5 × 2 · 3
6! = 24 × 32 ×5 = 16× 9 ×5. Hence, 6! is divisible by 9.
Suppose an integer n such as n > 6, then n! = n × (n − 1) × (n − 2) × (n − 3) ×
. . . × 7 × 6!. As 6! is divisible by 9, n! is also divisible by 9.
Hence, the Claim is true.
So, we need to check the remainder for (1! + 2! + 3! + 4! + 5!) as every number
after that is 0 (mod 9).
(1! + 2! + 3! + 4! + 5!) = 1 + 2 + 6 + 24 + 120
= 153
153 ≡ 0 (mod 9)
Hence, the answer is 0.
14
Example 3:
Find the remainder when (25733 + 46)26 is divided by 50.
Solution:
First, find the remainder when (25733 + 46) is divided by 50.
(25733 + 46) (mod 50) = (25733 (mod 50)) + (46 (mod 50))
257 ≡ 7 (mod 50) → 25733 ≡ 733 (mod 50)
72 ≡ (−1) (mod 50)
(72 )16 ≡ (−1)16 (mod 50)
32
7 ·7≡1·7 (mod 50)
733 ≡ 7 (mod 50)
46 ≡ −4 (mod 50)
(25733 + 46) (mod 50) = 7 + (−4) (mod 50) = 3 (mod 50)
(25733 + 46)26 ≡ 326 (mod 50)
As gcd(3, 50) = 1, Euler’s theorem can be used.
ϕ(50) = 20
320 ≡ 1 (mod 50)
320 · 36 ≡ 1 · 36 (mod 50)
26 6
3 ≡3 (mod 50)
326 ≡ 729 (mod 50)
26
3 ≡ 29 (mod 50)
33 26
(257 + 46) ≡ 29 (mod 50)
Hence, the answer is 29.
Example 4:
A five-digit number α = abcde is such that when divided by 2, 3, 4, 5, and
6, it leaves the remainder a, b, c, d, and e respectively. Find all such type of
numbers.
Solution:
Notice that a < 2, b < 3, c < 4, d < 5 and e < 6 as remainder is always less
than the dividend.
15
abcde ≡ a (mod 2). Divisibility of 2 indicates that the remainder of the last
digit is the same as the number when divided by 2. The remainder when divided
by 2 can be either 0 or 1. Bust as α is a five-digit number, a ̸= 0 and a = 1.
Hence, e ∈ {1, 3, 5, 7, 9}
abcde ≡ b (mod 3). Divisibility by 3 indicates that the sum of the digits of
a number gives the same remainder as the number when divided by 3.
(a + b + c + d + e) ≡ b (mod 3)
1+c+d+e≡0 (mod 3)
c+d+e≡2 (mod 3)
abcde ≡ c (mod 4). Divisibility of 4 indicates that the last two digits taken
as a two-digit number gives the same remainder as the number when divided
by 4.
de ≡ c (mod 4)
(10d + e) ≡ c (mod 4)
abcde ≡ d (mod 5). Divisibility of 5 indicates that the remainder of the last
digit is the same as that of the number when divided by 5.
e ≡ d (mod 5)
abcde ≡ e (mod 6). As e < 6, e ∈ {1, 3, 5}.
Now, we need to do some casework:
Case 1: e = 1
As e ≡ d (mod 5), d = 1
. (10d + e) ≡ c (mod 4) → 10 + 1 ≡ c (mod 4) → 11 ≡ c (mod 4) → c = 3
abcde ≡ e (mod 6) → 1b311 ≡ 1 (mod 6) → 1b310 ≡ 0 (mod 6)
=⇒ 1b310 ≡ 0 (mod 3) =⇒ 3|(1 + b + 3 + 1 + 0)
= 3|5 + b
Hence, b = 1.
One such number that satisfies all the given conditions is 11311.
Case 2: e = 3
As e ≡ d (mod 5), d = 3.
16
(10d + e) ≡ c (mod 4) → (30 + 3) ≡ c (mod 4) → 33 ≡ c (mod 4) → c = 0
So, c = 0, d = 3 and e = 3. But this does not satisfy the following congruence:
(c + d + e) ≡ 2 (mod 3)
(c + d + e) = (0 + 3 + 3) = 6
6 ̸≡ 2 (mod 3)
Hence, there is no possible number in this case.
Case 3: e = 5
As e ≡ d (mod 5), d = 0
(10d + e) ≡ c (mod 4) → (0 + 5) ≡ c (mod 4) → 5 ≡ c (mod 4) → c = 1
So, c = 1, d = 0 and e = 5. But this does not satisfy the following congruence:
(c + d + e) ≡ 2 (mod 3)
(c + d + e) = (1 + 0 + 5) = 6
6 ̸≡ 2 (mod 3)
Hence, there is no possible number in this case.
There is only possible value of α, that is α = 11311
17