sec 1
sec 1
Sheet # 1 Basics
Question #1: Using Fermat theory, find the following:
A)331 mod 7
B)235 mod 7
C)128129 mod 17
D)2925 mod 11
Fermat’s Theory:
𝑭𝒆𝒓𝒎𝒂𝒕′𝒔 𝑻𝒉𝒆𝒐𝒓𝒚
⏞
𝒂𝑷−𝟏 𝒎𝒐𝒅 𝑷 ≡ 𝟏 , 𝒂𝑷 𝒎𝒐𝒅 𝑷 ≡ 𝒂
If a is coprime with P.
A)331 mod 7
In this case, p = 7 and a = 3. Therefore, we have:
3(7-1) ≡ 1 (mod 7)
36 ≡ 1 (mod 7)
Now, we can use this result to evaluate 331 mod 7:
331 mod 7 = (330* 3) mod 7 = [( 36) 5 *3] mod 7 = [15* 3] mod 7 = 3 mod 7
Therefore, 331 mod 7is equal to 3.
B)235 mod 7
In this case, p = 7 and a = 2. Therefore, we have:
2(7-1) ≡ 1 (mod 7)
26 ≡ 1 (mod 7)
Now, we can use this result to evaluate 235 mod 7:
235 mod 7= [(26)5 mod 7* (25) mod 7]mod 7
= [15* 25] mod 7 = 25mod 7 = 32 mod 7 = 4
Therefore, 235 mod 7 is equal to 4.
C)128129 mod 17
In this case, p = 17 and a = 128. Therefore, we have:
128(17-1) ≡ 1 (mod 17)
12816 ≡ 1 (mod 17)
Now, we can use this result to evaluate 128129 mod 17:
128129 mod 17= [(12816)8 mod 17* (1281) mod 17]mod 17
= [18* (1281)] mod 17 = 128 mod 17 = 9
Therefore, 128129 mod 17 is equal to 9.
D)2925 mod 11
In this case, p = 11 and a = 29. Therefore, we have:
29(11-1) ≡ 1 (mod 11)
2910≡ 1 (mod 11)
Now, we can use this result to evaluate 2925 mod 11:
2925 mod 11= [(2910)2 mod 11* (295) mod 11] mod 11=
= [12* (295)] mod 11 = (295) mod 11 = [(𝟐𝟗𝟒 ) mod 11* (29) mod 11] = 3*7 mod 11
= 3 * 7 mod 11 = 21 mod 11 = 10
Therefore, 2925 mod 11 is equal to 10.
To find gcd (47, 7) using the Euclidean algorithm, we repeatedly divide the larger number
by the smaller number and take the remainder. The GCD is the last non-zero remainder.
Step 1: Divide 47 by 7: 47 ÷ 7 = 6 with a remainder of 5
gcd (47, 7) = gcd (47 mod 7, 7) =gcd (5, 7)
Step 2: Divide 7 by 5: 7 ÷ 5 = 1 with a remainder of 2
gcd (5, 7) = gcd (7 mod 5, 5) = gcd (2, 5)
Step 3: Divide 5 by 2: 5 ÷ 2 = 2 with a remainder of 1
gcd (2, 5) = gcd (5 mod 2, 2) = gcd (2, 1)
Step 4: Divide 2 by 1: 2 ÷ 1 = 2 with a remainder of 0
gcd (2, 1) = gcd (2 mod 1, 1) = gcd (0, 1) =1
Since the remainder is 0, the GCD is the last non-zero remainder, which is 1.
Therefore, gcd (47, 7) = 1.
This means that 47 and 7 are relatively prime, meaning they have no common factors
other than 1.
Question #4: Find the remainder of the division of 34565 by 13.
Using Fermat’s Theory:
Fermat’s Theory:
𝑭𝒆𝒓𝒎𝒂𝒕′𝒔 𝑻𝒉𝒆𝒐𝒓𝒚
⏞
𝒂𝑷−𝟏 𝒎𝒐𝒅 𝑷 ≡ 𝟏 , 𝒂𝑷 𝒎𝒐𝒅 𝑷 ≡ 𝒂
If a is coprime with P.
Question #5: Find the last digit of 7100 in case of decimal expansion.
= [(𝟒𝟓)𝟓*𝟒𝟓𝟗 ]mod 89= [(𝟒𝟓)𝟏𝟒 ]mod 89= [(𝟒𝟓)𝟏𝟐*𝟒𝟓𝟐 ]mod 89= [45*𝟒𝟓𝟐 ]mod 89
45(3) ≡ 78 (mod 89) =78
Question #10: Using Euler theorem, what is the remainder of 192200002 modulo 23?
Euler’s Theory:
𝑬𝒖𝒍𝒆𝒓′𝒔 𝑻𝒉𝒆𝒐𝒓𝒚
⏞
𝒂𝝋(𝒏) 𝒎𝒐𝒅 𝒏 ≡ 𝟏 , 𝒂𝝋(𝒏)+𝟏 𝒎𝒐𝒅 𝒏 ≡ 𝒂