How prove the constant term of $\left(1+x+\frac{1}{x}\right)^p\equiv1\pmod {p^2}$ if $p>3$ is odd prime number,show that:
the constant term of $$\left(1+x+\dfrac{1}{x}\right)^p\equiv1\pmod {p^2}$$
My try: since
$$(1+x+\dfrac{1}{x})^p=\sum_{k=0}^{p}\binom{p}{k}\left(x+\dfrac{1}{x}\right)^k=\sum_{k=0}^{p}\binom{p}{k}\sum_{j=0}^{k}\binom{k}{j}x^{k-2j}$$
so when $k=2j$,then the term is constant.
But how prove this constant $\equiv 1\pmod {p^2}$?

For $p=2$, $(1+x+\frac{1}{x})^2=x^2+2x+3+\frac{2}{x}+\frac{1}{x^2}$.
$3\equiv 1\ (mod\ 4)$ ???
