OFFSET
1,1
COMMENTS
Does a(n) exist for each n? - Charles R Greathouse IV, Jun 03 2013
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2)=19 because 3+5+19=3^3;
a(3)=41 because 5+7+11+41=4^3;
a(4)=89 because 5+7+11+13+89=5^3.
PROG
(PARI) a(n)=if(n==1, return(5)); my(v=primes(n), s=sum(i=1, n, v[i]), N=(n+1)^3); forprime(p=v[#v]+1, N, if(isprime(N-s), return(N-s)); if(N<s, return(-1)); s+=p-v[1]; v=concat(v[2..n], p)) \\ Charles R Greathouse IV, Jun 03 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Nov 29 2004
EXTENSIONS
a(7) inserted, a(9)-a(42) from Charles R Greathouse IV, Jun 03 2013
STATUS
approved