

A094787


a(n) = smallest prime p such that p + n is a perfect power m^k, k >= 2.


0



3, 2, 5, 5, 3, 2, 2, 17, 7, 17, 5, 13, 3, 2, 17, 11, 19, 7, 13, 5, 11, 3, 2, 3, 2, 23, 5, 53, 3, 2, 5, 17, 3, 2, 29, 13, 107, 11, 61, 41, 23, 7, 101, 5, 19, 3, 2, 73, 79, 31, 13, 29, 11, 67, 73, 113, 7, 23, 5, 61, 3, 2, 37, 17, 79, 59, 61, 13, 31, 11, 29, 53, 71, 7, 53, 5, 23, 3, 2, 41, 19
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


COMMENTS

Conjecture: every prime is contained in this sequence.


LINKS

Table of n, a(n) for n=2..82.


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.


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) }


CROSSREFS

Sequence in context: A159587 A124732 A167552 * A132778 A182289 A127738
Adjacent sequences: A094784 A094785 A094786 * A094788 A094789 A094790


KEYWORD

nonn


AUTHOR

Cino Hilliard, Jun 10 2004


STATUS

approved



