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.

A072937 Least k such that prime(n) appears in factorization of k! + 1.

Original entry on oeis.org

2, 4, 3, 5, 12, 16, 9, 14, 18, 30, 36, 40, 21, 23, 52, 15, 8, 18, 7, 72, 23, 13, 88, 96, 100, 6, 106, 86, 112, 63, 65, 16, 16, 50, 150, 156, 81, 166, 172, 89, 180, 95, 102, 196, 99, 210, 222, 61, 228, 64, 210, 240, 97, 31, 131, 9, 93, 40, 280, 282, 45, 63, 220, 312, 91
Offset: 2

Views

Author

Benoit Cloitre, Aug 20 2002

Keywords

Examples

			12!+1 = 13^2*2834329 and 12 is the smallest integer k such that 13 = prime(6) appears in k!+1 factorization, hence a(6)=12
		

Crossrefs

Cf. A073944 (duplicate of this sequence, with an initial term a(1)=1).

Programs

  • PARI
    a(n)=if(n<0,0,s=1; while((s!+1)%prime(n)>0,s++); s)