2023 WSMO Team Round Problems/Problem 11

Problem

When $\frac{1}{7}$ is expressed in base $k,$ the digits are $0.a_{k,1}a_{k,2}\dots,$ where $a_{k,1}a_{k,2},\dots$ are decimal digits. Let $f(p)$ denote the minimum positive integer $x\geq2$ such that $a_{p,1} = a_{p,x},$ for $k\not\equiv0\pmod{7},$ and $1$ for $k\equiv0\pmod{7}.$ Find $\sum_{i=2}^{100}f(i).$

Solution