HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A coding club sets two remainders as a warm-up…
HardMathematicsHigh School (11–12)Number TheoryNumericalOlympiad

A coding club sets two remainders as a warm-up…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A coding club sets two remainders as a warm-up. The first is the remainder when 320023^{2002}32002 is divided by the prime 171717. The second is the remainder when 73457^{345}7345 is divided by the prime 111111. Use Fermat's little theorem to cut each exponent down, then finish by hand. Give both remainders, and say which exponent each is reduced to.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

For a prime ppp with p∤ap \nmid ap∤a, Fermat's little theorem gives ap−1≡1a^{p-1} \equiv 1ap−1≡1, so exponents can be reduced modulo p−1p - 1p−1:

aq(p−1)+r≡ar(modp).\displaystyle a^{q(p-1) + r} \equiv a^r \pmod p.aq(p−1)+r≡ar(modp).

The worked solution

Check an answer or open a hint to unlock the worked solution.

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Given. 320023^{2002}32002 modulo 171717 and 73457^{345}7345 modulo 111111; both moduli are prime and divide neither base.

Step 1. Reduce the first exponent. 2002=16×125+22002 = 16 \times 125 + 22002=16×125+2. So 32002≡32=9(mod17)3^{2002} \equiv 3^2 = 9 \pmod{17}32002≡32=9(mod17).

Step 2. Reduce the second exponent. 345=10×34+5345 = 10 \times 34 + 5345=10×34+5. So 7345≡75(mod11)7^{345} \equiv 7^5 \pmod{11}7345≡75(mod11).

Step 3. Finish. 72=49=4×11+57^2 = 49 = 4 \times 11 + 572=49=4×11+5, so 74≡25≡37^4 \equiv 25 \equiv 374≡25≡3, and 75≡3×7=21≡107^5 \equiv 3 \times 7 = 21 \equiv 1075≡3×7=21≡10.

Check. 10≡−110 \equiv -110≡−1, so 710≡17^{10} \equiv 1710≡1, as Fermat says. That also tells us 757^575 had to be 111 or −1-1−1.

Answer: the remainders are 999 and 101010; the exponents reduce to 222 and 555.

Log in to save this for later
← All Problems
← Two bells ring on their own schedules. A number x of minutes is wanted with x ≡ 5 pmod12 and x ≡ 11…Prove that n⁷ - n is a multiple of 42 for every integer n… →
More onNumber Theory

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. The triangular numbers are 1, 3, 6, 10, …, where the nth one is (n(n + 1))/2…Advanced
  2. Prove that the equation x³ + y³ + z³ = n has no solution in integers when n leaves remainder 4 or 5…Advanced
  3. Find every triple of positive integers a ≤ b ≤ c with 1/a + 1/b + 1/c = 1, and prove that there are…Advanced
  4. Find all pairs of positive integers (x, y) with x² - y² = 945…Hard
  5. A teacher wants a list of every primitive Pythagorean triple whose hypotenuse is less than 100…Advanced
All problems on this topic →