TITLE: How prove this $n^n+47\equiv 0\pmod{2^l}$
QUESTION [8 upvotes]: Show that: for any positive integer $l$, there exist positive integers $n$ such
$$n^n+47\equiv 0\pmod{2^l}$$
I feel this problem maybe uses Mathematical induction, but I can't solve it.
Thank you

REPLY [3 votes]: For $l\leq 4$ we have $n=1$, so suppose $l>4$.
Fisrt, note that the order of the elements of the multiplicative group $\mathbb Z_{2^l}^*$ is at most $\varphi(2^l)=2^{l-1}$, where $\varphi$ is the totient function. In fact, this order can be bounded by $2^{l-2}$ (you can found a simple proof of this in Introduction to Analytic Number Theory by Tom Apostol, p. 206), although this result is not needed for the problem. 
Now, if $n^n+47\equiv0\pmod{2^l}$, but $n^n+47\not\equiv0\pmod{2^{l+1}}$ we have
$$(n+2^l)^{n+2^l}\equiv(n+2^l)^n \pmod{2^{l+1}}$$
and
$$\begin{align}
(n+2^l)^n&=\sum_{j=0}^n\binom nj n^j2^{l(n-j)}=\\
&=n^n+n\cdot n^{n-1}2^l+2^{2l}s=\\
&=n^n(1+2^l)+2^{2l}s
\end{align}$$
for some integer $s$.
Since $2^l$ divides $n^n+47$ but $2^{l+1}$ doesn't, $n^n+47\equiv2^l\pmod{2^{l+1}}$. Taking modulus $2^{l+1}$ in the former equation,
$$\begin{align}(n+2^l)^n &\equiv (2^l-47)(1+2^l)\equiv\\
&\equiv -46\cdot2^l-47\equiv\\
&\equiv-47\pmod{2^{l+1}}
\end{align}$$
q.e.d.