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.

A122395 Primes of the form p^k - p^(k-1) - 1, with p prime and k>1.

Original entry on oeis.org

3, 5, 7, 17, 19, 31, 41, 53, 109, 127, 271, 293, 499, 811, 929, 2027, 2161, 3659, 4373, 4421, 4969, 8191, 9311, 10099, 13121, 13309, 16001, 17029, 19181, 22051, 32579, 38611, 57839, 72091, 78607, 93941, 109229, 128521, 131071, 143261, 157211
Offset: 1

Views

Author

T. D. Noe, Aug 31 2006

Keywords

Comments

The paper by Stein and Williams gives a method for finding primes of this form when k>(p+1)/2.

Crossrefs

Cf. A122396.

Programs

  • Maple
    N:= 10^6: # for terms <= N
    p:= 1: R:= NULL:
    do
      p:= nextprime(p);
      if p^2 - p - 1 > N then break fi;
      for k from 2 do
        q:= p^k - p^(k-1)-1;
        if q > N then break fi;
        if isprime(q) then R:= R, q fi;
    od od:
    sort(convert({R},list)); # Robert Israel, Mar 12 2023
  • Mathematica
    nn=10^6; lst={}; n=1; While[p=Prime[n]; k=2; While[m=p^k-p^(k-1)-1; m2, n++ ]; lst=Union[lst]