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.

A034915 Primes of the form p^k - p + 1 for prime p.

Original entry on oeis.org

3, 7, 31, 43, 79, 127, 157, 241, 337, 727, 1321, 3121, 4423, 6163, 6841, 8191, 19183, 19681, 22651, 26407, 28549, 29761, 37057, 68881, 78121, 113233, 117643, 121453, 130303, 131071, 143263, 208393, 292141, 371281, 375157, 412807, 524287, 527803
Offset: 1

Views

Author

Keywords

Comments

Related to hyperperfect numbers of a certain form.
Since x^k-x+1 is divisible by x^2-x+1 for k==2 (mod 6), none of k=8,14,20,... occur. - Robert Israel, Mar 20 2018

Examples

			11^3 - 11 + 1 = 1321 is prime, so 1321 is a term.
		

Crossrefs

Contains A074268.

Programs

  • Maple
    N:= 10^6: # to get all terms <= N
    Res:= NULL;
    p:= 1:
    do
      p:= nextprime(p);
      if p^2-p+1>N then break fi;
      for i from 2 to floor(log[p](N+p-1)) do
        if isprime(p^i-p+1) then Res:= Res, p^i-p+1 fi
      od
    od:
    sort(convert({Res},list)); # Robert Israel, Mar 20 2018