Let x and n be positive integers such that $$1 + x + x^2 + x^3 ... + x^{n-1}$$ is a prime number. Then show that n is a prime number.
So I have summed up the GP and equated it to y which is a prime number. I have no clue how I should proceed forward. Can you please help me out ?
Say $n=ab$ where $a,b>1$. Since $$1 + x + x^2 + x^3 ... + x^{n-1} ={x^n-1\over x-1}$$
$$={x^{ab}-1\over x-1}={(x^a-1)((x^a)^{b-1}+...(x^a)^2+x^a+1)\over x-1}$$
$$ = \underbrace{(x^{a-1}+...+x^2+x+1)}_{>1}\cdot \underbrace{((x^a)^{b-1}+...(x^a)^2+x^a+1)}_{>1}$$
a contradiction.