Level 4 — ApplicationNumber Theory (Intermediate)

Number Theory (Intermediate)

60 minutes50 marksprintable — key stays hidden on paper

Level 4 — Application (novel problems, no hints) Time limit: 60 minutes Total marks: 50


Question 1. [10 marks]

(a) Find the smallest positive integer NN formed using only the digits 00 and 11 (in decimal) that is divisible by 4545. Justify your answer using divisibility rules. [6]

(b) A number MM has decimal representation a73b\overline{a\,7\,3\,b} (a four-digit number with unknown leading digit a0a \neq 0 and unknown units digit bb). Determine all pairs (a,b)(a,b) for which MM is divisible by 1111 and also by 88. [4]


Question 2. [10 marks]

(a) Express the repeating decimal x=0.135x = 0.\overline{135} (i.e. 0.1351350.135135\ldots) as a fraction pq\frac{p}{q} in lowest terms. [4]

(b) Prove that 3\sqrt{3} is irrational. [6]


Question 3. [12 marks]

Consider the integers a=1234a = 1234 and b=588b = 588.

(a) Use the Euclidean algorithm to compute gcd(1234,588)\gcd(1234, 588), showing every division step. [4]

(b) Use the extended Euclidean algorithm to find integers x,yx, y such that 1234x+588y=gcd(1234,588)1234x + 588y = \gcd(1234, 588). [5]

(c) Hence write down the general solution (x,y)(x, y) to the equation in part (b), and state why 1234u+588v=51234u + 588v = 5 has no integer solutions. [3]


Question 4. [10 marks]

(a) Solve the simultaneous congruences using the Chinese Remainder Theorem, giving the unique solution modulo the appropriate modulus: x2(mod3),x3(mod5),x2(mod7).x \equiv 2 \pmod 3,\qquad x \equiv 3 \pmod 5,\qquad x \equiv 2 \pmod 7. [7]

(b) A basket of eggs, when counted in groups of 33 leaves 22, in groups of 55 leaves 33, and in groups of 77 leaves 22. What is the smallest possible number of eggs greater than 100100? [3]


Question 5. [8 marks]

(a) State Fermat's Little Theorem. [2]

(b) Using Fermat's Little Theorem (or otherwise), compute the remainder when 31003^{100} is divided by 77. Show your reasoning. [4]

(c) Compute the last digit of 720247^{2024}, justifying via modular arithmetic mod 1010. [2]


Answer keyMark scheme & solutions

Question 1

(a) [6 marks]

Divisible by 45=9×545 = 9 \times 5. Since digits are only 0,10,1:

  • Divisible by 55 ⇒ last digit is 00 or 55; only 00 is allowed, so ends in 0. (1)
  • Divisible by 99 ⇒ digit sum divisible by 99; digit sum = number of 11s, so we need at least nine 1s. (2)

Smallest such number: nine 11s followed by a 00: N=1111111110N = 1111111110. (2)

Check: digit sum =9=9 (÷9 ✓), ends in 0 (÷5 ✓), so ÷45 ✓. (1)

N=1111111110\boxed{N = 1111111110}

(b) [4 marks]

M=a73bM = \overline{a73b}, digits a,7,3,ba,7,3,b.

Divisibility by 88: last three digits 73b=730+b\overline{73b} = 730 + b divisible by 8. 730=891+2730 = 8\cdot91 + 2, so 730+b2+b(mod8)730+b \equiv 2+b \pmod 8b6(mod8)b \equiv 6 \pmod 8b=6b = 6. (2)

Divisibility by 1111: alternating sum b3+7a=(b+7)(3+a)=b+4ab - 3 + 7 - a = (b+7)-(3+a) = b + 4 - a must be 0(mod11)\equiv 0 \pmod{11}. With b=6b=6: 6+4a=10a0(mod11)6+4-a = 10 - a \equiv 0 \pmod{11}a=10a = 10 (invalid) or a=1011=1a = 10-11=-1 (invalid)... check 10a010-a \equiv 0: a=10a=10 not a digit.

Reconsider: need 10a0(mod11)10 - a \equiv 0 \pmod{11}, so a10(mod11)a \equiv 10 \pmod{11}; no valid digit 1a91\le a\le9.

Thus no pair satisfies both. State: (a,b)(a,b) with b=6b=6 but no valid aa; hence no solution exists. (2)

(Full marks awarded for correctly deriving b=6b=6 and correctly concluding no valid aa exists.)


Question 2

(a) [4 marks]

Let x=0.135x = 0.\overline{135}. Period length 3 ⇒ multiply by 10001000: (1) 1000x=135.135,1000xx=135999x=135.1000x = 135.\overline{135}, \quad 1000x - x = 135 \Rightarrow 999x = 135. (2) x=135999=537(gcd(135,999)=27).x = \frac{135}{999} = \frac{5}{37}\quad(\gcd(135,999)=27). (1)

x=537\boxed{x = \tfrac{5}{37}}

(b) [6 marks]

Suppose, for contradiction, 3=p/q\sqrt3 = p/q with p,qp,q integers, q0q\neq0, gcd(p,q)=1\gcd(p,q)=1. (1)

Then 3q2=p23q^2 = p^2, so 3p23 \mid p^2. Since 3 is prime, 3p3 \mid p. (2) Write p=3kp = 3k: 3q2=9k2q2=3k23q^2 = 9k^2 \Rightarrow q^2 = 3k^2, so 3q23q3 \mid q^2 \Rightarrow 3 \mid q. (2) Then 3p3 \mid p and 3q3 \mid q contradicts gcd(p,q)=1\gcd(p,q)=1. Hence 3\sqrt3 is irrational. (1)


Question 3

(a) [4 marks] Euclidean algorithm: 1234=2588+581234 = 2\cdot588 + 58 (1) 588=1058+8588 = 10\cdot58 + 8 (1) 58=78+258 = 7\cdot8 + 2 (1) 8=42+0gcd=2.8 = 4\cdot2 + 0 \Rightarrow \gcd = 2. (1)

gcd(1234,588)=2\boxed{\gcd(1234,588)=2}

(b) [5 marks] Back-substitute: 2=58782 = 58 - 7\cdot8 (1) =587(5881058)=71587588= 58 - 7(588 - 10\cdot58) = 71\cdot58 - 7\cdot588 (1) =71(12342588)7588=711234149588= 71(1234 - 2\cdot588) - 7\cdot588 = 71\cdot1234 - 149\cdot588 (2)

So x=71,  y=149x = 71,\; y = -149. Check: 711234149588=8761487612=271\cdot1234 - 149\cdot588 = 87614 - 87612 = 2(1)

(x,y)=(71,149)\boxed{(x,y) = (71,\,-149)}

(c) [3 marks] General solution (d=2d=2, a/d=617a/d=617, b/d=294b/d=294): x=71+294t,y=149617t,tZ.x = 71 + 294t,\qquad y = -149 - 617t,\quad t\in\mathbb Z. (2) 1234u+588v=51234u+588v=5 has no solution because any such linear combination is divisible by gcd=2\gcd=2, and 252\nmid 5. (1)


Question 4

(a) [7 marks] Moduli 3,5,73,5,7 coprime; M=105M = 105. M1=35, M2=21, M3=15M_1=35,\ M_2=21,\ M_3=15. (1) Inverses: 352(mod3)35\equiv2\pmod3, 2122^{-1}\equiv2; 211(mod5)21\equiv1\pmod5, inv =1=1; 151(mod7)15\equiv1\pmod7, inv =1=1. (2) x2352+3211+2151=140+63+30=233(mod105).x \equiv 2\cdot35\cdot2 + 3\cdot21\cdot1 + 2\cdot15\cdot1 = 140 + 63 + 30 = 233 \pmod{105}. (2) 233mod105=2332105=23233 \bmod 105 = 233 - 2\cdot105 = 23. (1) Check: 232(3), 233(5), 232(7)23\equiv2(3),\ 23\equiv3(5),\ 23\equiv2(7)(1)

x23(mod105)\boxed{x \equiv 23 \pmod{105}}

(b) [3 marks] Solutions are x=23+105kx = 23 + 105k. Smallest >100>100: 23+105=12823+105 = 128. (3)

128 eggs\boxed{128 \text{ eggs}}


Question 5

(a) [2 marks] If pp is prime and gcd(a,p)=1\gcd(a,p)=1, then ap11(modp)a^{p-1}\equiv 1 \pmod p. (Equivalently apa(modp)a^p \equiv a \pmod p for all aa.) (2)

(b) [4 marks] p=7p=7, gcd(3,7)=1\gcd(3,7)=1361(mod7)3^6\equiv1\pmod7. (1) 100=616+4100 = 6\cdot16 + 4, so 3100=(36)163434(mod7)3^{100} = (3^6)^{16}\cdot3^4 \equiv 3^4 \pmod7. (2) 34=81=711+443^4 = 81 = 7\cdot11 + 4 \equiv 4. (1)

31004(mod7)\boxed{3^{100}\equiv 4 \pmod 7}

(c) [2 marks] 717, 729, 733, 741(mod10)7^1\equiv7,\ 7^2\equiv9,\ 7^3\equiv3,\ 7^4\equiv1\pmod{10}; cycle length 4. 20240(mod4)2024\equiv0\pmod4720247417^{2024}\equiv7^4\equiv1. Last digit =1= 1. (2)

last digit =1\boxed{\text{last digit }=1}


[
  {"claim":"0.135135... = 5/37", "code":"result = (Rational(135,999) == Rational(5,37))"},
  {"claim":"gcd(1234,588)=2 and Bezout 71*1234-149*588=2", "code":"result = (gcd(1234,588)==2) and (71*1234 - 149*588 == 2)"},
  {"claim":"CRM solution 23 satisfies all three congruences and 128 is smallest >100", "code":"result = (23%3==2 and 23%5==3 and 23%7==2 and (23+105)==128 and 128>100)"},
  {"claim":"3^100 mod 7 = 4 and last digit 7^2024 = 1", "code":"result = (pow(3,100,7)==4 and pow(7,2024,10)==1)"}
]