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.

Showing 1-4 of 4 results.

A115092 The number of m such that prime(n) divides m!+1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 1, 2, 2, 1, 4, 4, 3, 7, 1, 4, 4, 1, 1, 1, 3, 1, 2, 1, 2, 2, 4, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 5, 1, 2, 2, 1, 3, 3, 2, 3, 3, 2, 1, 1, 5, 4, 2, 1, 3, 1, 1, 2, 1, 1, 2, 2, 1, 3, 4, 3, 4, 6, 1, 3, 1, 3, 1, 1, 2, 2, 1, 2, 3, 3, 4, 1, 2, 2, 4, 1, 3, 2, 1, 1, 2, 4, 3, 4
Offset: 1

Views

Author

T. D. Noe, Mar 01 2006

Keywords

Comments

By Wilson's theorem, we know that for each prime p there is at least one m such that p divides m!+1. The largest such m is p-1. Sequence A073944 lists the smallest m for each prime.

Examples

			a(20)=7 because 71, the 20th prime, divides m!+1 for the seven values m=7,9,19,51,61,63,70. Interesting, note that 7+63=9+61=19+51=70.
		

Programs

  • Mathematica
    Table[p=Prime[i]; cnt=0; f=1; Do[f=Mod[f*m,p]; If[f+1==p,cnt++ ], {m,p-1}]; cnt, {i,150}]
  • PARI
    a(n,p=prime(n))=my(t=Mod(1,p)); sum(k=1,p-1, t*=k; t==-1) \\ Charles R Greathouse IV, May 15 2015

A154554 Primes p such that m=p-1 is the least number such that p divides m!+1.

Original entry on oeis.org

2, 3, 5, 13, 17, 31, 37, 41, 53, 73, 89, 97, 101, 107, 113, 151, 157, 167, 173, 181, 197, 211, 223, 229, 241, 281, 283, 313, 331, 337, 349, 353, 373, 409, 421, 433, 439, 457, 487, 509, 541, 547, 587, 617, 643, 653, 659, 677, 701, 751, 757, 761, 769, 773, 821
Offset: 1

Views

Author

T. D. Noe, Jan 12 2009

Keywords

Comments

The graph of A073944 shows two prominent curves. This sequence gives the primes on the upper curve. Primes on the lower curve are in sequence A154555. Note that the terms of A115092 are 1 for these primes.

Programs

  • Mathematica
    Rest[Reap[Do[p=Prime[i]; f=1; m=1; While[f=Mod[f*m,p]; f+1
    				

A154555 Primes p such that m=(p-1)/2 is the least number such that p divides m!+1.

Original entry on oeis.org

7, 11, 19, 43, 47, 127, 131, 163, 179, 191, 199, 263, 347, 367, 419, 431, 443, 491, 503, 523, 571, 619, 691, 727, 743, 787, 839, 863, 1051, 1087, 1091, 1123, 1291, 1319, 1367, 1451, 1487, 1499, 1571, 1579, 1583, 1667, 1723, 1783, 1823, 1931, 1951, 2003, 2039
Offset: 1

Views

Author

T. D. Noe, Jan 12 2009

Keywords

Comments

The graph of A073944 shows two prominent curves. This sequence gives the primes on the lower curve. Primes on the upper curve are in sequence A154554.

Crossrefs

Programs

  • Mathematica
    Rest[Reap[Do[p=Prime[i]; f=1; m=1; While[f=Mod[f*m,p]; f+1
    				

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)
Showing 1-4 of 4 results.