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. /The decimal of 1/41 repeats, and so does the decimal of 1/17…
AdvancedMathematicsHigh School (11–12)Number TheoryNumericalOlympiad

The decimal of 1/41 repeats, and so does the decimal of 1/17…

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.

The decimal of 141\dfrac{1}{41}411​ repeats, and so does the decimal of 117\dfrac{1}{17}171​. For a prime ppp other than 222 and 555, the length of the repeating block is the order of 101010 modulo ppp. Find the length for p=41p = 41p=41 by testing only the divisors of 404040, and for p=17p = 17p=17 by testing the divisors of 161616. Give both lengths.

Check your answer

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

Need a reminder? The key ideaShowHide

Wilson: (p−1)!≡−1(modp)(p - 1)! \equiv -1 \pmod p(p−1)!≡−1(modp) for a prime ppp. The order ord⁡n(a)\operatorname{ord}_n(a)ordn​(a), the least kkk with ak≡1a^k \equiv 1ak≡1, divides every mmm with am≡1a^m \equiv 1am≡1, so it divides φ(n)\varphi(n)φ(n):

am≡1(modn)  ⟺  ord⁡n(a)∣m.\displaystyle a^m \equiv 1 \pmod n \iff \operatorname{ord}_n(a) \mid m.am≡1(modn)⟺ordn​(a)∣m.

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. The length of the block of 1p\dfrac{1}{p}p1​ is ord⁡p(10)\operatorname{ord}_p(10)ordp​(10), which divides p−1p - 1p−1.

Step 1. For 41. The order divides 404040, so it is one of 1,2,4,5,8,10,20,401, 2, 4, 5, 8, 10, 20, 401,2,4,5,8,10,20,40. Now 10≢110 \not\equiv 110≡1, 102=100≡1810^2 = 100 \equiv 18102=100≡18, 104≡182=324=7×41+37≡−410^4 \equiv 18^2 = 324 = 7 \times 41 + 37 \equiv -4104≡182=324=7×41+37≡−4, and 105≡−40≡110^5 \equiv -40 \equiv 1105≡−40≡1. So the order is 555.

Step 2. For 17. The order divides 161616: one of 1,2,4,8,161, 2, 4, 8, 161,2,4,8,16. We get 102=100≡15≡−210^2 = 100 \equiv 15 \equiv -2102=100≡15≡−2, 104≡410^4 \equiv 4104≡4, 108≡16≡−110^8 \equiv 16 \equiv -1108≡16≡−1. None is 111, so the order is 161616.

Check. 141=0.02439‾\dfrac{1}{41} = 0.\overline{02439}411​=0.02439, a block of 555 digits, and indeed 41×2439=99 99941 \times 2439 = 99\,99941×2439=99999.

Answer: the block of 141\dfrac{1}{41}411​ has length 555, and the block of 117\dfrac{1}{17}171​ has length 161616.

Log in to save this for later
← All Problems
← The numbers 43 and 97 are prime. Use Wilson's theorem to find the remainder of 40! …Prove that if p is a prime with p ≡ 1 pmod 4, then x = ((p - 1)/2)! … →
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 →