[go: up one dir, main page]

login
A271394
1 and the prime powers (p^k, p prime, k >= 1) such that p^k - k and p^k + k are prime powers.
0
1, 2, 3, 8, 9, 25, 32, 512, 6561, 36703368217294125441230211032033660188801
OFFSET
1,2
COMMENTS
a(10) = 7^48. If it exists, a(11) > 10^100. - Giovanni Resta, Apr 12 2016
EXAMPLE
6561 is in this sequence because 6561 = 3^8, 6561 - 8 = 6553 is prime and 6561 + 8 = 6569 is prime.
MATHEMATICA
nn = 10^6; {1}~Join~Sort@ Apply[Power, Select[Flatten[Function[k, {#, k}] /@ Range[Floor@ Log[#, nn]] & /@ Prime@ Range@ PrimePi@ nn, 1], With[{p = First@ #, k = Last@ #}, And[Or[PrimePowerQ@ #, # == 1] &[p^k - k], Or[PrimePowerQ@ #, # == 1] &[p^k + k]]] &], 1] (* Michael De Vlieger, Apr 06 2016 *)
PROG
(PARI) ispp(n) = (n==1) || isprimepower(n);
isok(n) = (n==1) || ((k=isprimepower(n)) && ispp(n+k) && ispp(n-k));
\\ Michel Marcus, Apr 07 2016
CROSSREFS
Sequence in context: A279090 A163168 A085453 * A030439 A119386 A162219
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(10) from Giovanni Resta, Apr 12 2016
STATUS
approved