Hard Further Maths Number theory Questions

Challenging, exam-style Further Maths Number theory questions with worked solutions. Stretch yourself on the hardest extended-euclidean-algorithm, bezout-identity, linear-congruence, modular-arithmetic problems.

extended-euclidean-algorithmbezout-identitylinear-congruencemodular-arithmeticlinear-diophantine-equationfermats-little-theorem
Further Maths34 questionsStep-by-step solutions
Question 1
9 markschallenging
Which of the following is the least residue of 720247^{2024} modulo 10001000?
Show worked solution

Worked solution

  1. Write the exponent as a sum of powers of 22

    2024=1024+512+256+128+64+32+82024=1024+512+256+128+64+32+8

    Repeated squaring produces exactly these powers of 77.

  2. Square to reach the exponent 22

    7272=4949(mod1000)7^{2}\equiv7^{2}=49\equiv49\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  3. Square to reach the exponent 44

    74492=2401401(mod1000)7^{4}\equiv49^{2}=2401\equiv401\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  4. Square to reach the exponent 88

    784012=160801801(mod1000)7^{8}\equiv401^{2}=160801\equiv801\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  5. Square to reach the exponent 1616

    7168012=641601601(mod1000)7^{16}\equiv801^{2}=641601\equiv601\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  6. Square to reach the exponent 3232

    7326012=361201201(mod1000)7^{32}\equiv601^{2}=361201\equiv201\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  7. Square to reach the exponent 6464

    7642012=40401401(mod1000)7^{64}\equiv201^{2}=40401\equiv401\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  8. Square to reach the exponent 128128

    71284012=160801801(mod1000)7^{128}\equiv401^{2}=160801\equiv801\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  9. Square to reach the exponent 256256

    72568012=641601601(mod1000)7^{256}\equiv801^{2}=641601\equiv601\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  10. Square to reach the exponent 512512

    75126012=361201201(mod1000)7^{512}\equiv601^{2}=361201\equiv201\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  11. Square to reach the exponent 10241024

    710242012=40401401(mod1000)7^{1024}\equiv201^{2}=40401\equiv401\pmod{1000}

    Reducing modulo 10001000 after every squaring keeps the arithmetic small.

  12. Multiply in the factor 7327^{32}

    801×201=1610011(mod1000)801\times201=161001\equiv1\pmod{1000}

    The exponent 20242024 is the sum 8+328+32, so these are exactly the powers that must be multiplied together.

  13. Multiply in the factor 7647^{64}

    1×401=401401(mod1000)1\times401=401\equiv401\pmod{1000}

    The exponent 20242024 is the sum 8+32+648+32+64, so these are exactly the powers that must be multiplied together.

  14. Multiply in the factor 71287^{128}

    401×801=321201201(mod1000)401\times801=321201\equiv201\pmod{1000}

    The exponent 20242024 is the sum 8+32+64+1288+32+64+128, so these are exactly the powers that must be multiplied together.

  15. Multiply in the factor 72567^{256}

    201×601=120801801(mod1000)201\times601=120801\equiv801\pmod{1000}

    The exponent 20242024 is the sum 8+32+64+128+2568+32+64+128+256, so these are exactly the powers that must be multiplied together.

  16. Multiply in the factor 75127^{512}

    801×201=1610011(mod1000)801\times201=161001\equiv1\pmod{1000}

    The exponent 20242024 is the sum 8+32+64+128+256+5128+32+64+128+256+512, so these are exactly the powers that must be multiplied together.

  17. Select the least residue

    72024401(mod1000)7^{2024}\equiv401\pmod{1000}

    This is the remainder when the power is divided by 10001000.

Answer
401401
Question 2
9 markschallenging
Which of the following pairs of integers (x,y)\left(x,y\right) satisfies 2947x+1113y=gcd(2947,1113)2947x+1113y=\gcd\left(2947,1113\right)?
Show worked solution

Worked solution

  1. Divide 29472947 by 11131113

    2947=2×1113+7212947=2\times1113+721

    The remainder 721721 is smaller than the divisor 11131113, so the algorithm continues with the pair (1113,721)\left(1113,721\right).

  2. Divide 11131113 by 721721

    1113=1×721+3921113=1\times721+392

    The remainder 392392 is smaller than the divisor 721721, so the algorithm continues with the pair (721,392)\left(721,392\right).

  3. Divide 721721 by 392392

    721=1×392+329721=1\times392+329

    The remainder 329329 is smaller than the divisor 392392, so the algorithm continues with the pair (392,329)\left(392,329\right).

  4. Divide 392392 by 329329

    392=1×329+63392=1\times329+63

    The remainder 6363 is smaller than the divisor 329329, so the algorithm continues with the pair (329,63)\left(329,63\right).

  5. Divide 329329 by 6363

    329=5×63+14329=5\times63+14

    The remainder 1414 is smaller than the divisor 6363, so the algorithm continues with the pair (63,14)\left(63,14\right).

  6. Divide 6363 by 1414

    63=4×14+763=4\times14+7

    The remainder 77 is smaller than the divisor 1414, so the algorithm continues with the pair (14,7)\left(14,7\right).

  7. Divide 1414 by 77: the remainder is now zero

    14=2×7+014=2\times7+0

    The last non-zero remainder is 77, so the algorithm stops and gcd(2947,1113)=7\gcd\left(2947,1113\right)=7.

  8. Rearrange the last non-zero remainder line

    7=634×147=63-4\times14

    The last non-zero remainder is the gcd, so this line is the starting point of the back-substitution.

  9. Substitute 14=3295×6314=329-5\times63 from the line above

    7=(4)×329+21×637=\left(-4\right)\times329+21\times63

    Each substitution climbs one line up the algorithm, keeping the gcd written as an integer combination of two of the numbers.

  10. Substitute 63=3921×32963=392-1\times329 from the line above

    7=21×392+(25)×3297=21\times392+\left(-25\right)\times329

    Each substitution climbs one line up the algorithm, keeping the gcd written as an integer combination of two of the numbers.

  11. Substitute 329=7211×392329=721-1\times392 from the line above

    7=(25)×721+46×3927=\left(-25\right)\times721+46\times392

    Each substitution climbs one line up the algorithm, keeping the gcd written as an integer combination of two of the numbers.

  12. Substitute 392=11131×721392=1113-1\times721 from the line above

    7=46×1113+(71)×7217=46\times1113+\left(-71\right)\times721

    Each substitution climbs one line up the algorithm, keeping the gcd written as an integer combination of two of the numbers.

  13. Substitute 721=29472×1113721=2947-2\times1113 from the line above

    7=(71)×2947+188×11137=\left(-71\right)\times2947+188\times1113

    Each substitution climbs one line up the algorithm, keeping the gcd written as an integer combination of two of the numbers.

  14. Test the pair in the equation

    2947×(71)+1113×188=72947\times\left(-71\right)+1113\times188=7

    The pair produced by the back-substitution satisfies Bezout's identity.

  15. Select the correct pair

    2947×(71)+1113×188=gcd(2947,1113)=72947\times\left(-71\right)+1113\times188=\gcd\left(2947,1113\right)=7

    Only this pair reproduces the gcd.

Answer
(71,188)\left(-71,188\right)
Question 3
9 markschallenging
In the Euclidean algorithm the integers aa and bb (with b>0b>0) are written as a=bq+ra=bq+r where 0r<b0\le r<b. Which of the following is equal to gcd(a,b)\gcd\left(a,b\right) for all such aa and bb?
Show worked solution

Worked solution

  1. Write down the division line

    a=bq+r,0r<ba=bq+r,\qquad 0\le r<b

    This is the single line the Euclidean algorithm repeats.

  2. Let dd be a common divisor of aa and bb

    da and dbd\mid a\ \text{and}\ d\mid b

    The aim is to show that dd is then a common divisor of bb and rr.

  3. Deduce that dd divides rr

    r=abq  drr=a-bq\ \Rightarrow\ d\mid r

    A divisor of aa and of bb divides any integer combination of them.

  4. Now let ee be a common divisor of bb and rr

    eb and ere\mid b\ \text{and}\ e\mid r

    The converse direction is proved in exactly the same way.

  5. Deduce that ee divides aa

    a=bq+r  eaa=bq+r\ \Rightarrow\ e\mid a

    So the two pairs have exactly the same common divisors.

  6. Conclude that the greatest common divisors agree

    gcd(a,b)=gcd(b,r)\gcd\left(a,b\right)=\gcd\left(b,r\right)

    Identical sets of common divisors have the same greatest element.

  7. Test the false option gcd(a,r)\gcd\left(a,r\right)

    a=16, b=6:q=2, r=4,gcd(16,6)=24=gcd(16,4)a=16,\ b=6:\quad q=2,\ r=4,\quad\gcd\left(16,6\right)=2\ne4=\gcd\left(16,4\right)

    One counterexample is enough to kill that option.

  8. Test the false option gcd(q,r)\gcd\left(q,r\right)

    a=100, b=7:q=14, r=2,gcd(100,7)=12=gcd(14,2)a=100,\ b=7:\quad q=14,\ r=2,\quad\gcd\left(100,7\right)=1\ne2=\gcd\left(14,2\right)

    The quotient carries no information about the common divisors.

  9. Test the false option gcd(a,q)\gcd\left(a,q\right)

    a=15, b=6:q=2, r=3,gcd(15,6)=31=gcd(15,2)a=15,\ b=6:\quad q=2,\ r=3,\quad\gcd\left(15,6\right)=3\ne1=\gcd\left(15,2\right)

    The quotient is not tied to the common divisors at all.

  10. Test the false option gcd(b,q)\gcd\left(b,q\right)

    a=15, b=6:gcd(15,6)=32=gcd(6,2)a=15,\ b=6:\quad\gcd\left(15,6\right)=3\ne2=\gcd\left(6,2\right)

    The same counterexample disposes of this option.

  11. Note that this is what makes the algorithm work

    gcd(a,b)=gcd(b,r1)=gcd(r1,r2)=\gcd\left(a,b\right)=\gcd\left(b,r_{1}\right)=\gcd\left(r_{1},r_{2}\right)=\cdots

    Each line replaces the pair by a strictly smaller one with the same gcd.

  12. Note that the remainder is an integer combination of aa and bb

    r=abqr=a-bq

    This is the identity that both halves of the proof above rely on.

  13. Note that the same argument justifies Bezout's identity

    gcd(a,b)=ax+by\gcd\left(a,b\right)=ax+by

    Reversing the algorithm expresses the final remainder in terms of aa and bb.

  14. Note where the algorithm stops

    gcd(rk,0)=rk\gcd\left(r_{k},0\right)=r_{k}

    The last non-zero remainder is therefore the gcd of the original pair.

  15. Check the invariance on a concrete pair

    gcd(84,30)=6=gcd(30,24)\gcd\left(84,30\right)=6=\gcd\left(30,24\right)

    Here 84=2×30+2484=2\times30+24, and the gcd is unchanged.

  16. Recall the division algorithm

    a=bq+r,0r<ba=bq+r,\qquad 0\le r<b

    For any integers aa and b>0b>0 there are unique integers qq and rr of this form.

  17. Select the expression equal to gcd(a,b)\gcd\left(a,b\right)

    gcd(a,b)=gcd(b,r)\gcd\left(a,b\right)=\gcd\left(b,r\right)

    This identity is the engine of the Euclidean algorithm.

Answer
gcd(b,r)\gcd\left(b,r\right)
Question 4
9 markschallenging
Let f(n)=5n+2×11nf(n)=5^{n}+2\times11^{n}. In a proof by induction that f(n)f(n) is divisible by 33 for all positive integers nn, which of the following is the correct simplified form of f(k+1)5f(k)f(k+1)-5f(k)?
Show worked solution

Worked solution

  1. State the base case

    f(1)=27=3×9f\left(1\right)=27=3\times9

    The result is true for n=1n=1 because 33 divides 2727.

  2. State the inductive hypothesis

    f(k)=3M for some integer Mf\left(k\right)=3M\ \text{for some integer}\ M

    Assume the result holds for some n=kn=k; this is what the inductive step is allowed to use.

  3. Write down f(k+1)f\left(k+1\right)

    f(k+1)=22×11k+5×5kf\left(k+1\right)=22\times11^{k}+5\times5^{k}

    Replacing nn by k+1k+1 is the whole of the inductive step's raw material.

  4. Subtract 5f(k)5f\left(k\right)

    f(k+1)5f(k)=22×11k+5×5k5(2×11k+5k)=12×11kf\left(k+1\right)-5f\left(k\right)=22\times11^{k}+5\times5^{k}-5\left(2\times11^{k}+5^{k}\right)=12\times11^{k}

    This particular multiple of f(k)f\left(k\right) is subtracted because it cancels the dominant term and leaves something visibly divisible by 33.

  5. Rearrange to isolate f(k+1)f\left(k+1\right)

    f(k+1)=5f(k)+12×11kf\left(k+1\right)=5f\left(k\right)+12\times11^{k}

    Everything now depends on f(k)f\left(k\right), which the hypothesis controls.

  6. Substitute the inductive hypothesis

    f(k+1)=5×3M+3×4×11kf\left(k+1\right)=5\times3M+3\times4\times11^{k}

    The first term is a multiple of 33 by the hypothesis, and the second is 33 times the integer 4×11k4\times11^{k}.

  7. Factorise out 33

    f(k+1)=3(5M+4×11k)f\left(k+1\right)=3\left(5M+4\times11^{k}\right)

    The bracket is an integer, so 33 divides f(k+1)f\left(k+1\right).

  8. Complete the induction

    true for n=k  true for n=k+1\text{true for}\ n=k\ \Rightarrow\ \text{true for}\ n=k+1

    With the base case this proves the result for every positive integer nn.

  9. Check the claim at n=2n=2

    f(2)=267=3×89f\left(2\right)=267=3\times89

    A second value is a useful sanity check before the algebra starts.

  10. Check the claim at n=3n=3

    f(3)=2787=3×929f\left(3\right)=2787=3\times929

    The pattern of divisibility continues.

  11. Note the alternative congruence argument

    work modulo 3 throughout\text{work modulo}\ 3\ \text{throughout}

    Reducing every base modulo 33 proves the same result without induction.

  12. Note why a multiple of f(k)f\left(k\right) is subtracted

    f(k+1)5f(k) must be a multiple of 3f\left(k+1\right)-5f\left(k\right)\ \text{must be a multiple of}\ 3

    Any expression of the form 5f(k)+3C5f\left(k\right)+3C is divisible by 33 once the hypothesis is used.

  13. Check the answer numerically at k=2k=2

    f(3)5f(2)=27875×267=1452f\left(3\right)-5f\left(2\right)=2787-5\times267=1452

    This agrees with the general expression at k=2k=2.

  14. Recall the division algorithm

    a=bq+r,0r<ba=bq+r,\qquad 0\le r<b

    For any integers aa and b>0b>0 there are unique integers qq and rr of this form.

  15. Recall what divisibility means

    ba    a=bk for some integer kb\mid a\iff a=bk\ \text{for some integer}\ k

    Every divisibility argument in this topic goes back to this definition.

  16. Select the correct simplified form

    f(k+1)5f(k)=12×11kf\left(k+1\right)-5f\left(k\right)=12\times11^{k}

    This is the expression the inductive step produces.

Answer
12×11k12\times11^{k}
Question 5
9 markschallenging
Find the remainder when 320243^{2024} is divided by 100100.
Show worked solution

Worked solution

  1. Square to reach the exponent 22

    3232=99(mod100)3^{2}\equiv3^{2}=9\equiv9\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  2. Square to reach the exponent 44

    3492=8181(mod100)3^{4}\equiv9^{2}=81\equiv81\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  3. Square to reach the exponent 88

    38812=656161(mod100)3^{8}\equiv81^{2}=6561\equiv61\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  4. Square to reach the exponent 1616

    316612=372121(mod100)3^{16}\equiv61^{2}=3721\equiv21\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  5. Square to reach the exponent 3232

    332212=44141(mod100)3^{32}\equiv21^{2}=441\equiv41\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  6. Square to reach the exponent 6464

    364412=168181(mod100)3^{64}\equiv41^{2}=1681\equiv81\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  7. Square to reach the exponent 128128

    3128812=656161(mod100)3^{128}\equiv81^{2}=6561\equiv61\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  8. Square to reach the exponent 256256

    3256612=372121(mod100)3^{256}\equiv61^{2}=3721\equiv21\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  9. Square to reach the exponent 512512

    3512212=44141(mod100)3^{512}\equiv21^{2}=441\equiv41\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  10. Square to reach the exponent 10241024

    31024412=168181(mod100)3^{1024}\equiv41^{2}=1681\equiv81\pmod{100}

    Reducing modulo 100100 after every squaring keeps the arithmetic small.

  11. Multiply in the factor 3323^{32}

    61×41=25011(mod100)61\times41=2501\equiv1\pmod{100}

    The exponent 20242024 is the sum 8+328+32, so these are exactly the powers that must be multiplied together.

  12. Multiply in the factor 3643^{64}

    1×81=8181(mod100)1\times81=81\equiv81\pmod{100}

    The exponent 20242024 is the sum 8+32+648+32+64, so these are exactly the powers that must be multiplied together.

  13. Multiply in the factor 31283^{128}

    81×61=494141(mod100)81\times61=4941\equiv41\pmod{100}

    The exponent 20242024 is the sum 8+32+64+1288+32+64+128, so these are exactly the powers that must be multiplied together.

  14. Multiply in the factor 32563^{256}

    41×21=86161(mod100)41\times21=861\equiv61\pmod{100}

    The exponent 20242024 is the sum 8+32+64+128+2568+32+64+128+256, so these are exactly the powers that must be multiplied together.

  15. Multiply in the factor 35123^{512}

    61×41=25011(mod100)61\times41=2501\equiv1\pmod{100}

    The exponent 20242024 is the sum 8+32+64+128+256+5128+32+64+128+256+512, so these are exactly the powers that must be multiplied together.

  16. Multiply in the factor 310243^{1024}

    1×81=8181(mod100)1\times81=81\equiv81\pmod{100}

    The exponent 20242024 is the sum 8+32+64+128+256+512+10248+32+64+128+256+512+1024, so these are exactly the powers that must be multiplied together.

  17. State the remainder

    3202481(mod100)3^{2024}\equiv81\pmod{100}

    This is the remainder when 320243^{2024} is divided by 100100.

Answer
8181

Unlock 29 more Number theory questions

Create a free account to work through every Further Maths Number theory question with instant step-by-step worked solutions, progress tracking and interactive lessons.

  • Full worked solutions for every question
  • Interactive lessons and instant feedback
  • Track your mastery across every topic
Create a Free Account

No card required · Free forever

More Number theory practice

Related Further Pure topics