OFFSET
1,1
COMMENTS
Conjecture: There will always be an x,y,n such that x^2 + p = y^n for all primes p.
EXAMPLE
5 is the smallest number that when we add its square to prime 2, we get a perfect power, 3^3. So 3 is the first entry. 498^2 + 997 = 499^2. So 499 is the last entry in the table.
PROG
(PARI) sqplusp(n) = { local(p, x, y, c=0); forprime(p=2, n, for(x=1, n, y=x^2+p; if(ispower(y), print1(power(y)", "); c++; break ) ) ); print(); print(c) } exponent(n) = \ Return the exponent if n is a perfect power { local(x, ln, j, e=0); ln=omega(n); x=factor(n); e=x[1, 2]; for(j=2, ln, if(x[j, 2] < e, e=x[j, 2]) ); return(e) } power(n) = \Return the largest factor for which n is a perfect power { if(ispower(n), return(round(n^(1/exponent(n)))) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Feb 26 2006
STATUS
approved