2008 iTest Problems/Problem 48

Revision as of 16:14, 14 July 2018 by Rockmanex3 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Problem

A repunit is a natural number whose digits are all $1$. For instance,

\[1,11,111,1111, \ldots\]

are the four smallest repunits. How many digits are there in the smallest repunit that is divisible by $97$?

Solution

We have $\underbrace{111 \cdots 1}_{n\ \text{ones}} = 10^{n-1} + 10^{n-2} + \cdots + 1 = \frac{10^n - 1}{9}$. Since $9$ and $97$ are relatively prime, it suffices for $10^{n} - 1 \equiv 0 \pmod{97}$, or $10^{n} \equiv 1 \pmod{97}$.

The smallest integer $m$ such that $a^m \equiv 1 \pmod{p}$ where $\text{gcd}\,(a,p)=1$ is $m = \lambda (p)$, where $\lambda (p)$ is the Carmichael function. For primes $p$, $\lambda(p) = p-1$, and so the answer is $n = \boxed{96}$.

See also

2008 iTest (Problems)
Preceded by:
Problem 47
Followed by:
Problem 49
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100