login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A122395
Primes of the form p^k - p^(k-1) - 1, with p prime and k>1.
2
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,1
COMMENTS
The paper by Stein and Williams gives a method for finding primes of this form when k>(p+1)/2.
LINKS
Andreas Stein and H. C. Williams, Explicit primality criteria for (p-1)p^n-1, Math. Comp. 69 (2000), 1721-1734.
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; m<nn, If[PrimeQ[m], AppendTo[lst, m]]; k++ ]; k>2, n++ ]; lst=Union[lst]
CROSSREFS
Cf. A122396.
Sequence in context: A374156 A191038 A299298 * A045401 A085499 A169628
KEYWORD
nonn
AUTHOR
T. D. Noe, Aug 31 2006
STATUS
approved