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

%I #19 Oct 30 2017 11:16:02

%S 2,3,5,7,11,43,61,157,521,547,683,2731,4423,6163,13421,19183,22651,

%T 26407,37057,43691,113233,121453,143263,174763,208393,292141,375157,

%U 398581,412807,527803,590593,843643,981091,1041421,1193557,1246573

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

%C 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.

%H David A. Corneth, <a href="/A127727/b127727.txt">Table of n, a(n) for n = 1..33914 (terms < 10^14)</a> (the first 4799 terms < 10^12 from T. D. Noe)

%H H. Dubner and T. Granlund, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/DUBNER/dubner.html">Primes of the Form (b^n+1)/(b+1)</a>, J. Integer Sequences, 3 (2000), Article 00.2.7.

%H Douglas E. Iannucci, <a href="http://www.integers-ejcnt.org/g41/g41.Abstract.html">On a variation of perfect numbers</a>, INTEGERS: Electronic Journal of Combinatorial Number Theory, 6 (2006), #A41.

%e From _David A. Corneth_, Oct 28 2017: (Start)

%e For (p, e) = (3, 1) we have the prime 3^1 - 3^0 = 2.

%e For (p, e) = (2, 3) we have the prime 2^3 - 2^2 + 2^1 - 2^0 = 5.

%e 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;

%e 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.

%o (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

%Y Cf. A023195, A065507, A084741, A206369.

%K nonn,easy

%O 1,1

%A _T. D. Noe_, Jan 25 2007