cp's OEIS Frontend

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.

A240622 Least number k such that k!/n - 1 is prime.

Original entry on oeis.org

3, 3, 4, 4, 5, 4, 7, 4, 6, 5, 15, 6, 13, 7, 5, 9, 38, 8, 21, 5, 7, 19, 27, 6, 15, 14, 10, 7, 30, 5, 31, 8, 12, 18, 8, 6, 47, 53, 13, 5, 127, 10, 67, 11, 16, 27, 51, 8, 14, 26, 17, 16, 77, 9, 23, 7, 184, 56, 123, 6, 66, 203, 7, 9, 13, 13, 74, 42, 26, 7, 75, 9, 205
Offset: 1

Views

Author

Derek Orr, Apr 09 2014

Keywords

Comments

a(263) > 5000. - Jinyuan Wang, Mar 31 2020

Examples

			1!/1 - 1 = 0 is not prime. 2!/1 - 1 = 1 is not prime. 3!/1 - 1 = 5 is prime. Thus, a(1) = 3.
		

Crossrefs

Programs

  • Mathematica
    lnk[n_]:=Module[{k=1},While[!PrimeQ[k!/n-1],k++];k]; Array[lnk,80] (* Harvey P. Dale, Aug 31 2015 *)
  • PARI
    a(n) = {for(k=1, oo, s=k!/n-1; if(floor(s)==s, if(ispseudoprime(s), return(k)))); }