login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122396 Least k>1 such that p^k - p^(k-1) - 1 is prime for p = prime(n). 3
3, 2, 2, 2, 2, 3, 2, 7, 56, 2, 2, 8, 8, 8, 2, 4, 4, 2, 2, 2, 9, 3, 21496, 26, 2, 2, 4, 38, 7, 286644, 2, 2, 26, 2, 2, 4, 4, 15, 4, 24, 16, 2, 264, 4, 2, 3, 24, 3, 516, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Does a(n) always exist? Note that k cannot be 5, 11, 17,... (i.e., k=5 mod 6) because then p^2 - p + 1 divides p^k - p^(k-1) - 1.

From Richard N. Smith, Jul 15 2019: (Start)

The link has the primes 82*83^21495-1 = 83^21496-83^21495-1 and 112*113^286643-1 = 113^286644-113^286643-1, thus a(23)=21496 and a(30)=286644.

a(51) > 250000, since 232*233^k-1 is composite for all k<=250000, see link.

a(52) - a(61) = {4, 2, 80, 14, 76, 2, 90, 6, 80, 769}, a(62) > 200000. (End)

LINKS

Table of n, a(n) for n=1..50.

Steven Harvey, Williams primes

MATHEMATICA

lst={}; Do[p=Prime[n]; k=2; While[m=p^k-p^(k-1)-1; !PrimeQ[m], k++ ]; AppendTo[lst, k], {n, 22}]; lst

PROG

(PARI) a(n)=for(k=2, 10^6, if(ispseudoprime(prime(n)^k - prime(n)^(k-1) - 1), return(k))) \\ Richard N. Smith, Jul 15 2019

CROSSREFS

Cf. A087139, A122395.

Sequence in context: A104223 A057934 A058758 * A272893 A037199 A145376

Adjacent sequences:  A122393 A122394 A122395 * A122397 A122398 A122399

KEYWORD

nonn,more,hard

AUTHOR

T. D. Noe, Aug 31 2006

EXTENSIONS

a(23)-a(50) from Richard N. Smith, Jul 15 2019, using Steven Harvey's table.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 18:48 EDT 2020. Contains 334854 sequences. (Running on oeis4.)