# When does $2^n+n \mid 8^n+n$?

How to find all positive integers $n$ such that $2^n+n$ divides $8^n+n$ ?

• @Mathmo123: I see that $n=1,2,4,6$ are solutions ; apart from that nothing much – Souvik Dey Aug 18 '14 at 13:24
• If I'm not mistaken this is IMO problem and appeared in the last 25 years. – Stefan4024 Aug 18 '14 at 15:28

Since $$2^n\equiv -n\pmod{2^n+n}$$ we deduce $$8^n = (2^n)^3 \equiv (-n)^3 \pmod {2^n+n}$$

So $2^n+n\mid 8^n+n$ if and only if $2^n+n\mid n-n^3$.

For $n\geq 10$, $2^n>n^3$ so $2^n+n$ cannot divide $n^3-n=-(n-n^3)$.

Clearly, if $n=0,1$, $n^3-n=0$ so $2^n+n\mid n^3-n$.

So you really only need to check additionally $n=2,3,4,5,6,7,8,9$ by hand.

You get $n=0,1,2,4,6$. (Technically, we should exclude $n=0$ since the question asked for positive integers...)

• If one does not like $\equiv$, one can also write down directly that $(2^n+n)(4^n-2^nn+n^2)=8^n+n^3=(8^n+n)+(n^3-n)$ – Hagen von Eitzen Aug 18 '14 at 14:35