Maths WorkshopMaths problems with full solutions
Exercise 853Number theory › CongruencesL1Added 3 Nov 2026

Power cycles modulo $n$

#power cycle#periodicity#modulus

Statement

Study the sequence 2k mod 72^k\bmod 7 for k≥0k\ge0, and determine the period.

Hint

Compute successive powers and find when they repeat.

Show solutionHide solution

Solution

Powers.
- 20=12^0=1
- 21=22^1=2
- 22=42^2=4
- 23=8≡12^3=8\equiv1
- 24≡22^4\equiv2
- 25≡42^5\equiv4
- ...

Period. 33, generated by 23≡12^3\equiv1.

Conclusion. The sequence is periodic with period 33: 1,2,4,1,2,4,…1,2,4,1,2,4,\ldots.

General. The period of a mod na\bmod n is ord⁡n(a)\operatorname{ord}_n(a), which divides φ(n)\varphi(n).