Difference between revisions of "2008 iTest Problems/Problem 48"

m (Solution)
m
 
Line 12: Line 12:
 
The smallest integer <math>m</math> such that <math>a^m \equiv 1 \pmod{p}</math> where <math>\text{gcd}\,(a,p)=1</math> is <math>m = \lambda (p)</math>, where <math>\lambda (p)</math> is the [[Carmichael function]]. For primes <math>p</math>, <math>\lambda(p) = p-1</math>, and so the answer is <math>n = \boxed{96}</math>.
 
The smallest integer <math>m</math> such that <math>a^m \equiv 1 \pmod{p}</math> where <math>\text{gcd}\,(a,p)=1</math> is <math>m = \lambda (p)</math>, where <math>\lambda (p)</math> is the [[Carmichael function]]. For primes <math>p</math>, <math>\lambda(p) = p-1</math>, and so the answer is <math>n = \boxed{96}</math>.
  
 +
== See also ==
 
{{2008 iTest box|num-b=47|num-a=49}}
 
{{2008 iTest box|num-b=47|num-a=49}}
  
== See also ==
 
 
[[Category:Intermediate Number Theory Problems]]
 
[[Category:Intermediate Number Theory Problems]]

Latest revision as of 16:14, 14 July 2018

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