# odd prime division

Prove that if $p$ is an odd prime then $p$ divides

$\lfloor(2+\sqrt5)^p\rfloor -2^{p+1}$

I am struggling to progress with this question. Here is my working out so far:

Page 1 working out

Page 2 working out

I don't know if I'm on the right track or if I'm heading to abyss.

-

Let $$N=(2+\sqrt{5})^p+(2-\sqrt{5})^p.$$ Note that $N$ is an integer. There are various ways to see this. One can for example expand using the binomial theorem, and observe that the terms involving odd powers of $\sqrt{5}$ cancel.
Because $(2-\sqrt{5})^p$ is a negative number close to $0$, it follows that $N=\left\lfloor (2+\sqrt{5})^p\right\rfloor$.
In the two binomial expansions, all the binomial coefficients $\binom{p}{k}$ apart from the first and last are divisible by $p$. The first term in each expansion is $2^p$. We conclude that $N\equiv 2\cdot 2^p\pmod{p}$, and the result follows.
I follow your argument. Thanks. I imagine one uses the same argument for the generalised case $p$$^n$ instead of p, for p an odd prime. – Nadia Feb 22 at 11:32
You are welcome. About $p^n$, one attempt at generalization is that $p^n$ divides $\lfloor (2+\sqrt{5})^{p^n}\rfloor -2^{p^n+1}$. However, this is false, $p=3$, $n=2$. – André Nicolas Feb 22 at 19:35