cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A271394 1 and the prime powers (p^k, p prime, k >= 1) such that p^k - k and p^k + k are prime powers.

Original entry on oeis.org

1, 2, 3, 8, 9, 25, 32, 512, 6561, 36703368217294125441230211032033660188801
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 06 2016

Keywords

Comments

a(10) = 7^48. If it exists, a(11) > 10^100. - Giovanni Resta, Apr 12 2016

Examples

			6561 is in this sequence because 6561 = 3^8, 6561 - 8 = 6553 is prime and 6561 + 8 = 6569 is prime.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

a(10) from Giovanni Resta, Apr 12 2016