Find maximum natural number k such that for any odd n $n^{12} - n^8 - n^4 + 1$ is divisible by $2^k$ Given $n^{12} - n^8 - n^4 + 1$ it's easy to factorize it: $(n-1)^2(n+1)^2(n^2+1)^2(n^4+1)$. It's stated than this should be divisible by $2^k$ for any odd $n$. So I think that such maximum $k$ can be found by putting the least possible odd $n$ in the expression (because we can easily find such a $k$, that for a bigger $n$ the expression above is divisible by $2^k$, but for a smaller $n$ it isn't). So the least possible $n=3$ (for $n=1$ expression is $0$) and we have $4 \cdot 16 \cdot 100 \cdot 82 = 25 \cdot 41 \cdot 2^9$, so the $k$ we are looking for is $9$.
I am rather weak in number theory so I hope the get some feedback if my solution is correct.

$$(2r+1)^2+1\equiv8\cdot\dfrac{r(r+1)}2+2=8p+1\text{(say)}\equiv2\pmod8$$
$$(2r+1)^4+1=(8p+1)^2+1\equiv2\pmod{16}$$
Now $n^2-1=(2r+1)^2-1=8\cdot\dfrac{r(r+1)}2$
$\implies k\ge2\cdot3+2\cdot1+1$
