<s>[INST] Prove $n$ is prime. (Fermat's little theorem probably) 
Let $x$ and $n$ be positive integers such that $1+x+x^2\dots x^{n-1}$ is prime. Prove $n$ is prime

My attempt:
Say the above summation equal to $p$ $$1+x+x^2\dots x^{n-1}\equiv 0\text{(mod p)}\\
{x^n-1\over x-1}\equiv0\\
\implies x^n\equiv1\text{ (as $p$ can't divide $x-1$)}$$
How to proceed?
 [/INST] This does not involve any Fermat's little theorem type tricks. Indeed, it follows from a very simple factorization trick. 
In some sense, if $n = pq$, then we arrange the $n$ powers $x^0,...,x^{pq-1}$ in a $p \times q$ box fashion, and then collect terms.
So, write $n = pq$ for some $1 < p,q < n$ if $n$ is not prime. Then:
$$
1 + ... +  x^{pq-1} = (1 + ... + x^{p-1}) + (x^{p} + ... + x^{2p-1}) + ... + (x^{p(q-1)} + ... + x^{pq - 1}) \\ = (1 + ... + x^{p-1}) (1 + x^p + x^{2p} + ... +  x^{p(q-1)})
$$
for example, if $n = 6 = 2 \times 3$ then
$$1 + ... + x^5 = (1+x)(1 + x^2 + x^4)$$, and if $n = 9 = 3 \times 3$ then $$1 + ... + x^8 = (1+x+x^2)(1+x^3+x^6)$$
</s>