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
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
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