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 A065854 #10 Aug 05 2025 14:41:58 %S A065854 2,3,3,5,17,5,3,19,5,5,7,13,3,5,127,11,3,7,19,3,5,5,5,3,17,3,19,17,17, %T A065854 23,5,3,11,163,7,13,17,7,3,3,19,17,17,5,31,577,41,239,5,11,113,5,17,7, %U A065854 23,5 %N A065854 Smallest prime q such that (p^q-1)/(p-1) is a prime, where p = prime(n). %C A065854 a(n) = 2*A065813(n) + 1, n > 1. %H A065854 Andy Steward, <a href="http://www.users.globalnet.co.uk/~aads/titans.html">Titanic Prime Generalized Repunits</a> %t A065854 Do[p = Prime[n]; k = 1; While[ !PrimeQ[ (p^Prime[k] - 1)/(p - 1)], k++ ]; Print[ Prime[k]], {n, 1, 56} ] %t A065854 Table[Module[{q=2},While[!PrimeQ[(p^q-1)/(p-1)],q=NextPrime[q]];q],{p,Prime[Range[60]]}] (* _Harvey P. Dale_, Aug 05 2025 *) %o A065854 (PARI) { allocatemem(932245000); for (n=1, 100, p=prime(n); q=2; while (!isprime((p^q - 1)/(p - 1)), q=nextprime(q + 1)); write("b065854.txt", n, " ", q) ) } \\ _Harry J. Smith_, Nov 01 2009 %Y A065854 Cf. A084740 (least k such that (n^k-1)/(n-1) is prime). %K A065854 hard,nonn %O A065854 1,1 %A A065854 _Vladeta Jovovic_, Nov 26 2001