TITLE: how to prove that $1^x+2^x+3^x+4^x+\cdots+N^x$ will never sum to a prime number except $1^x+2^x$?
QUESTION [10 upvotes]: I am a a web developer programming in PhP which is limited to large calculations, but running a quick script shows that $1^x+2^x+3^x+4^x+\cdots+N^x$ can never sum to a prime number unless in the case of $1^x+2^x$, such as in the cases of $x=1$ and $x=2$ where $1^1+2^1=3$ and $1^2+2^2=5$.
As a self learner, I am currently refreshing my learning in Algebra 2 (before moving on), and sometimes my mind wonders into questions that I just can't find the answers to (mostly because I am not familiar with the concerned topics). I tried finding an answer but if this is a duplicate with a relevant answer, please close and refer me to it.
How to prove (if possible) that $1^x+2^x+3^x+4^x+\cdots+N^x$ will never be the sum of a prime number, unless in the case of $1^x+2^x$, such as in the cases of $x=1$ and $x=2$ where $1^1+2^1=3$ and $1^2+2^2=5$?
Edit: $x$ and $N$ are positive integers
I appreciate any answers even if it is just a hint or a reference.

REPLY [20 votes]: There is a counter-example
$$A=\sum_{n=1}^5 n^{1440}$$

It took about 30 minutes to run the primality test, a faster check is with
         ispseudoprime(sum(n=1,5,n^1440))

that you can try there https://pari.math.u-bordeaux.fr/gp.html
My script to find more candidates ($A$ is the smallest one)
      lambda(n)=znstar(n)[2][1];  # carmichael function
      f(a,b) =sum(j=1,a,j^b);
      maxlog=100000;
      for (n=3,300,{ b=lambda(n*(n+1)); l = b*log(n); for (k=1,floor( maxlog/l), if(ispseudoprime(f(n,k*b)), print("prime ",n," ",k*b),print(n," ",k*b)))})