Powers Of 2

Find the number of integers n n such that 1 < n 1000 1 < n \leq 1000 and 2 2 n 1 ( m o d 2 n 1 ) . 2^{2^n} \equiv 1 \pmod{2^n-1}.

Note: Even though I made this problem myself, it turns out that a similar problem has already been posed somewhere in USAJMO.


The answer is 9.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

6 solutions

We have: 2 2 n 1 ( m o d 2 n 1 ) 2 n 1 2 2 n 1 gcd ( 2 n 1 , 2 2 n 1 ) = 2 n 1 2 gcd ( 2 n , n ) 1 = 2 n 1 gcd ( 2 n , n ) = n n 2 n . \begin{array}{lcl} 2^{2^n} \equiv 1 \pmod{2^n-1} & \iff & 2^n-1 \mid 2^{2^n}-1 \\ &\iff &\gcd \left ( 2^n-1, 2^{2^n}-1 \right ) = 2^n - 1 \\ & \iff &2^{\gcd (2^n, n)}-1 = 2^n-1 \\ & \iff & \gcd (2^n, n)= n \\ & \iff & n|2^n. \end{array} Here we've used the well-known identity gcd ( a m 1 , a n 1 ) = a gcd ( m , n ) 1 ( a , m , n ) N 3 . \gcd \left ( a^m-1, a^n-1 \right ) = a^{\gcd (m,n)}-1 \ \forall \ (a, m, n) \in \mathbb{N}^3. Note that n n will divide 2 n 2^n if and only if n n is a power of 2 2 . There are log 2 ( 1000 ) = 9 \left \lfloor \log_2 (1000) \right \rfloor = \boxed{9} powers of two in the given range, which is our answer.

Your whole line of argument is wrong. Let's say n = 7 n=7 , which doesn't divide 2 n 2^n , we clearly see, 2 n 1 = 127. 2^{n}-1 = 127. and 2 2 n 1 = 16383. 2^{2^{n}} -1 = 16383. and 16383 16383 and 127 127 have gcd 127 127 . So the above expression 2 2 n 1 ( m o d 2 n 1 ) 2^{2^n} \equiv 1 \pmod{ 2^{n} - 1 } is true for all values of 1 < n 1000 1 < n \leq 1000 . Hence the number of integers for which above expression is true is : 999 999

Suvendu Sabat - 7 years, 4 months ago

Log in to reply

First of all, 2 2 7 1 2^{2^7}-1 is way more than 16383 16383 . In fact, 2 2 7 1 = 340282366920938463463374607431768211455 , 2^{2^7}-1= 340282366920938463463374607431768211455, and gcd ( 2 2 7 1 , 2 7 1 ) = 1 \gcd \left( 2^{2^7}-1, 2^7 - 1 \right) = 1 .

Second, even if my argument was wrong, you couldn't point out the mistake. All you did is that you tried to show a counterexample, which is not even valid!

Third, suppose n = 7 n=7 did satisfy the problem condition. How would you conclude that it holds for all positive integers?

Sreejato Bhattacharya - 7 years, 4 months ago
Siddharth Kumar
Jan 25, 2014

simply use the fact that ,gcd(a^m -1,a^n -1)=[a^gcd(m,n)] -1

Andres Fabrega
Feb 2, 2014

We know the order modulo 2 n 1 2^{n} - 1 of 2 2 is n n . Therefore any D D such that 2 D 2^{D} is congruent to 0 0 mod 2 n 1 2^{n} - 1 will be divisible by n n . Therefore we just need to find all the n n such that n n divides 2 n 2^{n} . Then we see the only n n that satisfy this are the ones which are a power of 2 2 , since 2 n 2^{n} is a power of 2 2 . Then, we simply check and reach the conclusion that there are 9 9 powers of 2 2 smaller or equal than 1000 1000 , thus yielding the answer. Note: n = 1 n=1 also satisfies the congruence, but the problem states that n > 1 n>1 .

Omar Obeya
Feb 1, 2014

let's write the equation as 2^(2^n) - 1 = 0 (mod 2^n-1)

Write both terms using binary representation:

111...111111 (2^n times ) = 0 (mod 111..1111 (n times) )

We can see that this will be satisfied if and only number of ones in the first term (2^n) is divisible by number of ones in the second term (n) so n should not have any prime factor except 2 so n must be a power of 2 so valid values will be 2,4,8,16,32,64,128,256,512

Neon Biswas
Jan 30, 2014

Well it is clear that $n$ is the order of 2 $(mod n)$ .Let the otherwise that $n$ is not order hence $\exists$ $h<n$ s.t $2^n-1|2^h-1$ but as $h<n$ hence $2^n-1>2^h-1$ hence contradiction.So order is $n$. Again $2^{2n} \equiv 1(mod 2^n-1)$ so $n|2^n$.Clearly $n$ mus be a power of $2$ and it is sufficient because $v_2(n)<n$ and thus it is true for all powers of $2$.As $2^9<1000<2^10$ the answer follows.

Well this is due to the LaTeX error.Let order of 2 2 mod 2 n 1 2^n-1 is h h .Clearly h n h \ge n as 2 n 1 ( m o d n ) 2^n \equiv 1(mod n) .Again if h < n h <n then 2 h 1 < 2 n 1 2^h-1<2^n-1 hence contradiction.So h = n h=n .So clearly as 2 2 n 1 ( m o d 2 n 1 ) 2^{2^n} \equiv 1(mod 2^n-1) so it is clear that n 2 n n|2^n .So it is necessary that n n is a power of 2 2 .As v 2 ( n ) < n v_2(n) < n so it is sufficient also.Now as 2 9 < 1000 < 2 1 0 2^9<1000<2^10 ,so the result sollows.

Neon Biswas - 7 years, 4 months ago

2 2 n 1 ( m o d 2 n 1 ) 2 n 1 2^{2^n} \equiv 1 \pmod{2^n - 1} \Rightarrow 2^n -1 divides 2 2 n 1 2^{2^n} - 1 . This gives gcd ( 2 n 1 , 2 2 n 1 ) = 2 gcd ( n , 2 n ) 1 = 2 n 1 \gcd(2^n - 1, 2^{2^n} - 1) = 2^{\gcd(n,2^n) - 1} = 2^n - 1 . [By Euclid's division algorithm on indices] This gives n n divides 2 n 2^n . So n n must be a power of 2 2 as well i.e., n { 2 1 , 2 2 , . . . , 2 9 } n \in \{2^1,2^2,...,2^9\} .

Just pointing out a minor typo: the second last line should read gcd ( 2 n 1 , 2 2 n 1 ) = 2 gcd ( n , 2 n ) 1 = 2 n 1. \gcd \left( 2^n-1, 2^{2^n}-1 \right) = 2^{\gcd (n, 2^n)} -1 = 2^n-1.

Sreejato Bhattacharya - 7 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...