Prime denominators and cycle length
When we write a fraction like as a decimal, the digits often fall into a repeating block — and the length of that block satisfies a beautiful number-theoretic property. This problem connects decimal expansions, modular arithmetic, and Fermat’s little theorem, giving you a powerful way to predict the period without doing the long division. By working through the steps, you’ll consolidate your understanding of orders modulo a prime, a topic that appears in both the Extension 1 and Extension 2 HSC courses.
Problem Statement
Let be prime, , and be period length of .
- Show is the least positive integer with .
- Deduce .
- Find periods for and .
Hints
Use Fermat's theorem and first occurrence of .
Solutions
We start by linking the period length to a divisibility condition. The standard theory of recurring decimals tells us that the block of length occurs because the remainder after multiplying and subtracting is , giving the fractional part exactly shifted. This translates directly into the integer condition , which is precisely the congruence . The minimality of as the period length guarantees that no smaller positive exponent yields this congruence — is the least positive integer satisfying the relation.
To deduce that divides we bring in Fermat’s little theorem. Since does not divide , we know . The order of an element modulo — here the order of — always divides any exponent that returns . Our is exactly that order, so we must have . This step reveals why the period of is always a factor of , a delightful general fact.
Now we can check the specific primes. For , we test small to find the least positive integer with .
is not a multiple of .
is not a multiple of .
; since , we have . No smaller works, so the period .
Similarly, for we examine :
is not divisible by .
Checking further, and , so . Because no smaller gives divisibility, the period is .
Takeaways
- The period length of (for a prime ) is exactly the order of modulo , i.e. the smallest with .
- Fermat’s little theorem forces to divide , giving a divisor upper bound on the period.
- For a concrete prime, you can find by testing powers of until becomes divisible by ; the smallest such is the period.
Further Readings
HSC Integrals, HSC Inequalities, HSC Polys Ext 1, HSC Vectors