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.

A073944 a(n) is the smallest m such that n-th prime divides m! + 1.

Original entry on oeis.org

1, 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
Offset: 1

Views

Author

Jason Earls, Nov 13 2002

Keywords

Comments

Essentially the same as A072937. - R. J. Mathar, Sep 23 2008
By Wilson's theorem, a(n) < prime(n). Sequence A115092 gives the number of m such that prime(n) divides m!+1. - T. D. Noe, Mar 01 2006, Jan 10 2009

Crossrefs

Cf. A038507.
Cf. A072937 (same sequence without a(1)).

Programs

  • Mathematica
    Table[p=Prime[i]; m=1; While[m

    0, m++ ]; m, {i,100}] (* T. D. Noe, Mar 01 2006 *) Module[{sm=Table[{m,m!+1},{m,400}]},Table[SelectFirst[sm,Mod[#[[2]],p]==0&],{p,Prime[ Range[70]]}]][[;;,1]] (* Harvey P. Dale, Sep 15 2023 *)

A115091 Primes p such that p^2 divides m!+1 for some integer m

Original entry on oeis.org

5, 11, 13, 47, 71, 563, 613
Offset: 1

Views

Author

T. D. Noe, Mar 01 2006

Keywords

Comments

By Wilson's theorem, we know that there is an m=p-1 such that p divides m!+1. Sequence A115092 gives the number of m for each prime. Occasionally p^2 also divides m!+1. These primes seem to be only slightly more plentiful than Wilson primes (A007540). No other primes < 10^6.
There is no prime p < 10^8 such that p^2 divides m!+1 for some m <= 1200. [From F. Brunault (brunault(AT)gmail.com), Nov 23 2008]
For a(n), m = p-A259230(n). - Felix Fröhlich, Jan 24 2016

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd Ed., New York, Springer-Verlag, 2004, Section A2.

Crossrefs

Cf. A064237 (n!+1 is divisible by a square), A259230.

Programs

  • Mathematica
    nn=1000; lst={}; Do[p=Prime[i]; p2=p^2; f=1; m=1; While[m
  • PARI
    forprime(p=1, , for(k=1, p-1, if(Mod((p-k)!, p^2)==-1, print1(p, ", "); break({1})))) \\ Felix Fröhlich, Jan 24 2016

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
    				

A160245 a(n) = index of the n-th prime in A051301 (least prime factor of m!+1).

Original entry on oeis.org

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

Views

Author

Frederick Magata (frederick.magata(AT)web.de), May 05 2009

Keywords

Comments

Because of Wilson's theorem A051301(p-1)=p for every prime p. Hence a(n)>0, and since A051301(k)>k, a(n) is actually finite.
The first 18 values of the sequence were calculated with Maple. The others were derived from T. D. Noe's b-file for b051301.txt.

Examples

			a(17)=3 because A051301(15)=A051301(43)=A051301(58)=59, and there are no other occurrences of 59=17th prime number in A051301.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember; local k,l,p: p:=ithprime(n): l:=0: for k from 0 to p-2 do if A051301(k)=p then l:=l+1; fi; od; l+1; end;
  • Mathematica
    prev={}; Table[p=Prime[n]; s=Select[Complement[Range[0,p-1],prev], Mod[ #!+1,p]==0&]; prev=Union[s,prev]; Length[s], {n,100}] (* T. D. Noe, May 12 2009 *)

Extensions

Extended by T. D. Noe, May 12 2009
Showing 1-4 of 4 results.