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.
%I A122396 #32 Jul 23 2019 16:53:12 %S A122396 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, %T A122396 286644,2,2,26,2,2,4,4,15,4,24,16,2,264,4,2,3,24,3,516,6 %N A122396 Least k>1 such that p^k - p^(k-1) - 1 is prime for p = prime(n). %C A122396 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. %C A122396 From _Richard N. Smith_, Jul 15 2019: (Start) %C A122396 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. %C A122396 a(51) > 250000, since 232*233^k-1 is composite for all k<=250000, see link. %C A122396 a(52) - a(61) = {4, 2, 80, 14, 76, 2, 90, 6, 80, 769}, a(62) > 200000. (End) %H A122396 Steven Harvey, <a href="http://harvey563.tripod.com/wills.txt">Williams primes</a> %t A122396 lst={}; Do[p=Prime[n]; k=2; While[m=p^k-p^(k-1)-1; !PrimeQ[m], k++ ]; AppendTo[lst,k], {n,22}]; lst %o A122396 (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 %Y A122396 Cf. A087139, A122395. %K A122396 nonn,more,hard %O A122396 1,1 %A A122396 _T. D. Noe_, Aug 31 2006 %E A122396 a(23)-a(50) from _Richard N. Smith_, Jul 15 2019, using Steven Harvey's table.