Math Help - prove this

1. prove this

show that if a and n are positive integers with n>1, a>1 such that (a^n)+1 is prime, then n=2^k, where k is a positive integer.

2. Originally Posted by mandy123
show that if a and n are positive integers with n>1, a>1 such that (a^n)+1 is prime, then n=2^k, where k is a positive integer.
If $n$ is odd then $x^n + y^n = (x+y)(x^{n-1}-x^{n-2}y+x^{n-3}y-...-xy^{n-2}+y^{n-2})$.
Thus, if $n$ has a non-trivial odd factor $p$ then $a^n+1 = (a^m)^p + 1 = (a^m+1)(....)$ and it would not be prime.