Finding the least exponent in writing a power of 2015 in binary

42 Views Asked by At

Written in binary, 2017 looks like 11111100001. Find the smallest exponent n > 0 (if it exists) such that 2017^n ends in . . . 00000000001

1

There are 1 best solutions below

0
On

We have $2017=2^{11}-2^5+2^0$. You want $2017^n\equiv1\bmod2^{11}$. Since

$$ 2017^n\equiv\left(2^{11}-2^5+2^0\right)^n\equiv\left(-2^5+2^0\right)^n\equiv1-n\cdot2^5+n(n-1)\cdot2^9\mod2^{11}\;, $$

we need $\left(2^4(n-1)-1\right)n\equiv0\bmod2^6$. Since the first factor is odd, all $6$ factors of $2$ must be in $n$, so this first happens for $n=2^6=64$.