which the numbers ${(k+1)}^n-2k^n, (k=1,2,\ldots,p)$ form a modulo complete residue system $p.$ Find all primes $p$ and positive integers $n$ for which the numbers ${(k+1)}^n-2k^n, (k=1,2,\ldots,p)$ form a  modulo complete residue system $p.$
It from this https://artofproblemsolving.com/community/c6h1462616p8450893
 A: Let's call  a pair $(p,n)$ "good" if it satisfies your condition. Since $a^{p-1}=1$ for any $a\in \mathbb{F}_p$, the goodness of $(p,n)$ implies that of $(p,n+p-1)$ and vise versa, so we only have to consider those integers $n$ between $1$ and $p-1$.
Let $f(x)=(x+1)^{n}-2x^n$. When $(p,n)$ is good, the value $f(k)$ runs over a complete residue system of $p$ for $k=1,2,\cdots,p$, therefore for  any $a\in \mathbb{F}_p$, the polynomial $f(x)-a$ has no repeated root in $\mathbb{F}_p$, or equivalently, the polynomials $f(x)-a$ and $f'(x)$ cannot vanish simultaneously when $x$ runs over $\mathbb{F}_p$. However the constant $a$ is arbitrary, so $$f'(x)=n[(x+1)^{n-1}-2x^{n-1}]$$ has to be rootless in $\mathbb{F}_p$. Notice by our assumption $n$ is invertible in $\mathbb{F}_p$, hence we are reduced to solve the equation $(x+1)^{n-1}-2x^{n-1}=0$. Now if $x\in\mathbb{F}_p$ is a root, then  $$2=\left(\frac{x+1}{x}\right)^{n-1}=(1+x^{-1})^{n-1}$$
is an $n-1$-th power residue in $\mathbb{F}_p$, and since $1+x^{-1}$ can take any value other than $1$, the converse is also true. In other words, $(p,n)$ is good iff $2$ is not an $n-1$-th power residue in $\mathbb{F}_p$. 
