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.

A120430 Greater of prime powers that differ by 1. In other words, numbers k such that k-1 and k are prime powers.

Original entry on oeis.org

2, 3, 4, 5, 8, 9, 17, 32, 128, 257, 8192, 65537, 131072, 524288, 2147483648, 2305843009213693952, 618970019642690137449562112, 162259276829213363391578010288128
Offset: 1

Views

Author

Greg Huber, Jul 13 2006

Keywords

Comments

See comments in A006549.

Crossrefs

Cf. A006549.

Programs

  • Mathematica
    Join[{2},Select[Range[0,10^6],PrimePowerQ[#]&&PrimePowerQ[#-1]&]] (* James C. McMahon, Oct 05 2024 *)
  • PARI
    isokp(n) = (n==1) || isprime(n) || (ispower(n, ,&k) && isprime(k));
    isok(n) = isokp(n) && isokp(n-1); \\ Michel Marcus, Aug 25 2013

Formula

a(n) = A006549(n) + 1. - Michel Marcus, Aug 25 2013