OFFSET
1,1
COMMENTS
Conjecture: every prime is contained in this sequence.
EXAMPLE
2+8=10, 3+8=11, 5+8=13, 7+8=15, 11+8=19, 13+8, 17+8=25. 17 is the first prime that when added to 8 gives a perfect power, viz. 25.
MAPLE
A094787 := proc(n)
local i ;
for i from 1 do
if isA001597(ithprime(i)+n) then
return ithprime(i) ;
end if;
end do:
end proc:
seq(A094787(n), n=1..40) ; # R. J. Mathar, Nov 15 2019
PROG
(PARI) k(n, m) = for(j=1, m, forprime(x=2, n, if(ispower(x+j), print1(x", "); break))) ispower(n) = { local(p, r, j); r = sqrt(n); for(j=2, floor(r), p = floor(log(n)/log(j)+.5); if(j^p ==n, return(1)); ); return(0) }
(Magma) a:=[]; for n in [1..81] do p:=2; while not IsPower(p+n) do p:=NextPrime(p); end while; Append(~a, p); end for; a; // Marius A. Burtea, Nov 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Jun 10 2004
EXTENSIONS
Offset corrected by R. J. Mathar, Nov 15 2019
STATUS
approved