Find all $n$ such that the following is prime

68 Views Asked by At

Find all positive integers $n$ for which $(1+n+n^2+...+n^n)^2-n^n$ is prime.

1

There are 1 best solutions below

1
On

Assume $n$ is a positive integer greater than $1$.

The sum $$1+n+n^2+\cdots n^n$$ is a geometric series with value $$\frac{n^{n+1}-1}{n-1}$$

Hence the number can also be expressed as $$\frac{(n^n-1)(n^{n+2}-1)}{(n-1)^2}$$ which is composite for every integer $n>1$