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.

A127727 Primes of the form p^e - p^(e-1) + p^(e-2) - ... + (-1)^e, where p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 43, 61, 157, 521, 547, 683, 2731, 4423, 6163, 13421, 19183, 22651, 26407, 37057, 43691, 113233, 121453, 143263, 174763, 208393, 292141, 375157, 398581, 412807, 527803, 590593, 843643, 981091, 1041421, 1193557, 1246573
Offset: 1

Views

Author

T. D. Noe, Jan 25 2007

Keywords

Comments

These primes are important in studying k-imperfect numbers (A127724), see Iannucci-link. Except for the cases p^e = 3 and 8, which yield primes 2 and 5, e is an even number such that e+1 is prime. In fact, except for those two cases, all the primes are of the form (1+p^q)/(1+p), where q is an odd prime; that is, repunit primes with negative prime base.

Examples

			From _David A. Corneth_, Oct 28 2017: (Start)
For (p, e) = (3, 1) we have the prime 3^1 - 3^0 = 2.
For (p, e) = (2, 3) we have the prime 2^3 - 2^2 + 2^1 - 2^0 = 5.
The examples above are the cases mentioned in the comments not of the form (1+p^q)/(1+p). A prime of that form is below;
For (p, e) = (2, 4) we have the prime 2^4 - 2^3 + 2^2 - 2^1 + 2^0 = 11 = (1+p^(e+1)) / (1+p) = 33/3. (End)
		

Crossrefs

Programs

  • PARI
    upto(n) = {my(res = List([2,5])); forprime(p = 2, sqrtnint(n, 2), forprime(q = 3, logint(n * (1+p), p), r = (1+p^q)/(1+p); if(isprime(r), listput(res, r)))); listsort(res, 1); res} \\ David A. Corneth, Oct 28 2017