Find all natural numbers $ n$ for which $ 2^n-n^2$ is divisible by $ 7$.
Problem
Source: Ukraine 1997
Tags: algebra, polynomial, modular arithmetic, number theory unsolved, number theory
18.07.2009 20:08
http://en.wikipedia.org/wiki/Ramanujan-Nagell_equation
18.07.2009 20:45
This is much easier than the Ramanujan-Nagell equation. Exponentials and polynomials share the property of being periodic modulo a prime.
19.07.2009 02:23
n = { 3,4,5,7,15 }
19.07.2009 04:23
Is it just me, or is the Ramanujan-Nagell equation and this problem very different problems.
19.07.2009 17:35
I don't know, this site tell me: http://mathworld.wolfram.com/RamanujansSquareEquation.html
19.07.2009 18:50
That is not the equation we're looking at.
19.07.2009 19:24
$ 2^n$ modulo 7 has period of 3. $ n^2$ modulo 7 has period of 7. So $ 2^n-n^2$ modulo 7 has period of 21. It is easy to check $ n=1$ to 21.
26.10.2024 17:13
Note that $2^n$ is $1,2,4 \pmod 7,$ and $n^2 \equiv 0,1,2,4 \pmod 7,$ now note that we need both to be either $1,2,4 \pmod 7.$ Now we can take casework. If both are $1\pmod 7$ then $n \equiv 0 \pmod 3,$ and $1,6 \pmod 7,$ so $n$ can be either $15 \pmod {21},$ and $6 \pmod {21}.$ Now for the case of $2\pmod 7,$ we know that $n \equiv 1 \pmod 3,$ and $3,4 \pmod 7,$ thus we can conclude that $n \equiv 4, 10 \pmod {21}.$ Now for the last case if they are both $4\pmod 7,$ then we have that $n \equiv 2,5 \pmod 7$ and $n \equiv 2\pmod 3,$ we can see that the solutions are $2, 5 \pmod {21}$ thus all natural numbers $n$ are in the form of $\boxed{2,4,5,6,10,15 \pmod {21}}.$