Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2024/ia/paper-4/5e/iv/solution

Let
By Fermat's little theorem, . If the digit count is a multiple of , then . The cyclic decimal divisibility relation gives
and hence also modulo . Since is coprime to , every is a unit modulo . Therefore
for every . Since , this proves the required equivalence.

New to topics? Read the docs here!