OFFSET
1,1
COMMENTS
Conjecture: There will always be an x,y,n such that x^2 + p = y^n for all primes p. In otherwords, there is a one-one mapping of the prime numbers to y^n - x^2 for some x,y,n. Therefore primes of the form y^n - x^2 are infinite in number.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
5 is the smallest number that when we add its square to prime 2, we get a perfect power, 3^3. 1 is the smallest number that when we add its square to prime 3, we get a perfect power, 2^2. So 5 and 1 are the first two entries in the table.
MAPLE
ispow:= proc(n) local F;
F:= ifactors(n)[2];
igcd(F[.., 2])>1
end proc:
f:= proc(n) local p, x;
p:= ithprime(n);
for x from 1 do if ispow(x^2+p) then return x fi od
end proc:
map(f, [$1..100]); # Robert Israel, Mar 09 2026
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(x", "); c++; break ) ) ); print(); print(c) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Feb 26 2006
EXTENSIONS
Name clarified by Robert Israel, Mar 10 2026
STATUS
approved
