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.

Previous Showing 21-30 of 111 results. Next

A002583 Largest prime factor of n! + 1.

Original entry on oeis.org

2, 2, 3, 7, 5, 11, 103, 71, 661, 269, 329891, 39916801, 2834329, 75024347, 3790360487, 46271341, 1059511, 1000357, 123610951, 1713311273363831, 117876683047, 2703875815783, 93799610095769647, 148139754736864591, 765041185860961084291, 38681321803817920159601
Offset: 0

Views

Author

Keywords

Comments

Theorem: For any N, there is a prime > N. Proof: Consider any prime factor of N!+1.
Cf. Wilson's theorem (1770): p | (p-1)! + 1 iff p is a prime.
If n is in A002981, then a(n) = n!+1. - Chai Wah Wu, Jul 15 2019

Examples

			(0!+1)=[2], (1!+1)=[2], (2!+1)=[3], (3!+1)=[7], (4!+1)=25=5*[5], (5!+1)=121=11*[11], (6!+1)=721=7*[103], (7!+1)=5041=71*[71], etc. - Mitch Cervinka (puritan(AT)toast.net), May 11 2009
		

References

  • M. Kraitchik, On the divisibility of factorials, Scripta Math., 14 (1948), 24-26 (but beware errors).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Maximum(PrimeDivisors(Factorial(n)+1)): n in [0..30]]; // Vincenzo Librandi, Feb 14 2020
  • Mathematica
    PrimeFactors[n_]:=Flatten[Table[ #[[1]],{1}]&/@FactorInteger[n]]; Table[PrimeFactors[n!+1][[ -1]],{n,0,35}] ..and/or.. Table[FactorInteger[n!+1,FactorComplete->True][[ -1,1]],{n,0,35}] (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)
    FactorInteger[#][[-1,1]]&/@(Range[0,30]!+1) (* Harvey P. Dale, Sep 04 2017 *)
  • PARI
    a(n)=my(f=factor(n!+1)[,1]);f[#f] \\ Charles R Greathouse IV, Dec 05 2012
    

Formula

Erdős & Stewart show that a(n) > n + (1-o(1))log n/log log n and lim sup a(n)/n > 2. - Charles R Greathouse IV, Dec 05 2012
Lai proves that lim sup a(n)/n > 7.238. - Charles R Greathouse IV, Jun 22 2021

Extensions

More terms from Robert G. Wilson v, Aug 01 2000
Corrected by Jud McCranie, Jan 03 2001

A204657 Numbers n such that n!10 + 2 is prime.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 13, 19, 21, 25, 41, 57, 79, 127, 135, 149, 165, 177, 193, 209, 223, 255, 273, 287, 297, 375, 433, 459, 481, 565, 1079, 1435, 1543, 1771, 1913, 1983, 2063, 2305, 2653, 6789, 8757, 11149, 13671, 15433, 16369, 17261, 18129, 22129, 22785, 22875, 25235, 25247, 26329, 27675, 33391, 39075, 41195, 47435, 47621, 48409, 59235, 59715, 61571, 65433, 78761, 83033
Offset: 1

Views

Author

M. F. Hasler, Jan 17 2012

Keywords

Comments

n!10 = Product_{k=0..floor((n-1)/10)}(n - 10k).
a(61) > 50000. - Robert Price, Jun 10 2012
The first 11 primes associated with this sequence: 3, 3, 5, 7, 11, 13, 41, 173, 233, 1877, 293603. - Robert Price, Mar 10 2017
a(67) > 10^5. - Robert Price, Mar 31 2017

Crossrefs

Programs

  • Mathematica
    MultiFactorial[n_, k_] := If[n < 1, 1, n*MultiFactorial[n - k, k]];
    Select[Range[0, 50000], PrimeQ[MultiFactorial[#, 10] + 2] &]
  • PARI
    for(n=0,9999,isprime(prod(i=0,(n-2)\10,n-10*i)+2)& print1(n","))

Extensions

a(40)-a(59) from Robert Price, Jun 10 2012
Inserted missing term of 6789 by Robert Price, Mar 10 2017
a(61)-a(66) from Robert Price, Mar 31 2017

A051301 Smallest prime factor of n!+1.

Original entry on oeis.org

2, 2, 3, 7, 5, 11, 7, 71, 61, 19, 11, 39916801, 13, 83, 23, 59, 17, 661, 19, 71, 20639383, 43, 23, 47, 811, 401, 1697, 10888869450418352160768000001, 29, 14557, 31, 257, 2281, 67, 67411, 137, 37, 13763753091226345046315979581580902400000001
Offset: 0

Views

Author

Keywords

Comments

Theorem: For any N, there is a prime > N. Proof: Consider any prime factor of N! + 1.
Cf. Wilson's Theorem (1770): p | (p-1)! + 1 if and only if p is a prime.
If n is in A002981, then a(n) = n!+1. - Chai Wah Wu, Jul 15 2019

Examples

			a(3) = 7 because 3! + 1 = 7.
a(4) = 5 because 4! + 1 = 25 = 5^2. (5! + 1 is also the square of a prime).
a(6) = 7 because 6! + 1 = 721 = 7 * 103.
		

References

  • Albert H. Beiler, "Recreations in The Theory of Numbers, The Queen of Mathematics Entertains," Dover Publ. NY, 1966, Page 49.
  • M. Kraitchik, On the divisibility of factorials, Scripta Math., 14 (1948), 24-26 (but beware errors).

Crossrefs

Programs

  • Maple
    with(numtheory): A051301 := n -> sort(convert(divisors(n!+1),list))[2]; # Corrected by Peter Luschny, Jul 17 2009
  • Mathematica
    Do[ Print[ FactorInteger[ n! + 1, FactorComplete -> True ] [ [ 1, 1 ] ] ], {n, 0, 38} ]
    FactorInteger[#][[1,1]]&/@(Range[0,40]!+1) (* Harvey P. Dale, Oct 16 2021 *)
  • PARI
    a(n)=factor(n!+1)[1,1] \\ Charles R Greathouse IV, Dec 05 2012

Formula

Erdős & Stewart show that a(n) > n + (l-o(l))log n/log log n except when n + 1 is prime, and that a(n) > n + e(n)sqrt(n) for almost all n where e(n) is any function with lim e(n) = 0. - Charles R Greathouse IV, Dec 05 2012
By Wilson's theorem, a(n) >= n + 1 with equality if and only if n + 1 is prime. - Chai Wah Wu, Jul 14 2019

A051915 Numbers k such that 2*k! + 1 is prime.

Original entry on oeis.org

0, 1, 2, 3, 5, 12, 18, 35, 51, 53, 78, 209, 396, 4166, 9091, 9587, 13357, 15917, 17652, 46127, 66480
Offset: 1

Views

Author

Labos Elemer, Dec 18 1999

Keywords

Comments

Used PrimeForm to prove primality for n = 4166 (classical N-1 test). - David Radcliffe, May 28 2007
a(22) > 80000. - Serge Batalov, Jun 09 2025

Examples

			k = 5 is here because 2*5! + 1 = 241 is prime.
		

Crossrefs

Programs

Extensions

4166 from David Radcliffe, May 28 2007
More terms from Serge Batalov, Feb 18 2015
a(21) from Serge Batalov, Jun 08 2025

A200906 Numbers n such that cyclotomic polynomial value Phi(5,n!) is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 21, 44, 64, 244, 268, 2415
Offset: 1

Views

Author

Serge Batalov, Nov 23 2011

Keywords

Comments

2415 corresponds to a probable prime. - Serge Batalov, Nov 24 2011
a(12) > 15000. - Robert Price, Jun 20 2015

Examples

			5 is in the sequence because Phi(5,5!) = ((5!)^5-1)/(5!-1)= 209102521 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[Cyclotomic[5, n!]], Print[n]], {n, 0, 600}]
  • PARI
    for(n=0,600,x=n!;if(isprime(eval(polcyclo(5))),print(n)))

A076680 Numbers k such that 4*k! + 1 is prime.

Original entry on oeis.org

0, 1, 4, 7, 8, 9, 13, 16, 28, 54, 86, 129, 190, 351, 466, 697, 938, 1510, 2748, 2878, 3396, 4057, 4384, 5534, 7069, 10364
Offset: 1

Views

Author

Phillip L. Poplin (plpoplin(AT)bellsouth.net), Oct 25 2002

Keywords

Comments

a(25) > 6311. - Jinyuan Wang, Feb 06 2020

Examples

			k = 7 is a term because 4*7! + 1 = 20161 is prime.
		

Crossrefs

Cf. m*n!-1 is a prime: A076133, A076134, A099350, A099351, A180627-A180631.
Cf. m*n!+1 is a prime: A051915, A076679-A076683, A178488, A180626, A126896.
Cf. n!/m-1 is a prime: A002982, A082671, A139056, A139199-A139205.

Programs

  • Mathematica
    Select[Range[5000],PrimeQ[4#!+1]&] (* Harvey P. Dale, Mar 23 2011 *)
  • PARI
    is(k) = ispseudoprime(4*k!+1); \\ Jinyuan Wang, Feb 06 2020

Extensions

Corrected (added missed terms 2748, 2878) by Serge Batalov, Feb 24 2015
a(24) from Jinyuan Wang, Feb 06 2020
a(25)-a(26) from Michael S. Branicky, Jul 04 2024

A156165 Numbers k such that k![7]+1 is prime (n![7] = A114799(n) = septuple factorial).

Original entry on oeis.org

0, 1, 2, 4, 6, 9, 10, 12, 13, 24, 25, 26, 29, 31, 35, 36, 47, 49, 57, 58, 64, 71, 73, 75, 78, 80, 97, 123, 125, 129, 131, 135, 147, 150, 159, 183, 201, 250, 251, 255, 298, 336, 337, 458, 467, 556, 570, 657, 743, 801, 908, 925, 1003, 1209, 1473, 1524, 1716, 1881, 1926
Offset: 1

Views

Author

M. F. Hasler, Feb 10 2009

Keywords

Comments

a(103) > 50000. - Robert Price, Sep 03 2012

Crossrefs

Programs

  • Mathematica
    mf[n_, k_] := Product[n - i k, {i, 0, Quotient[n - 2, k]}];
    Reap[For[k = 0, k <= 2000, k++, If[PrimeQ[mf[k, 7] + 1], Sow[k]]]][[2, 1]] (* Jean-François Alcover, Feb 26 2019 *)
    Select[Range[0,2000],PrimeQ[Times@@Range[#,1,-7]+1]&] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    mf(n,k=7)=prod(i=0,(n-2)\k,n-i*k)
    for( n=0,9999, ispseudoprime(mf(n)+1) & print1(n","))

A001272 Numbers k such that k! - (k-1)! + (k-2)! - (k-3)! + ... - (-1)^k*1! is prime.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 10, 15, 19, 41, 59, 61, 105, 160, 661, 2653, 3069, 3943, 4053, 4998, 8275, 9158, 11164, 43592, 59961
Offset: 1

Views

Author

Keywords

Comments

At present the terms greater than or equal to 2653 are only probable primes.
Živković shows that all terms must be less than p = 3612703, which divides the alternating factorial af(k) for k >= p. - T. D. Noe, Jan 25 2008
Notwithstanding Živković's wording, p = 3612703 also divides the alternating factorial for k = 3612702. [Guy: If there is a value of k such that k + 1 divides af(k), then k + 1 will divide af(m) for all m > k.] Therefore af(3612701), approximately 7.3 * 10^22122513, is the final primality candidate. - Hans Havermann, Jun 17 2013
Next term (if it exists) has k > 100000 (per M. Rodenkirch post). - Eric W. Weisstein, Dec 18 2017

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 160, p. 52, Ellipses, Paris 2008.
  • Martin Gardner, Strong Laws of Small Primes, in The Last Recreations, p. 198 (1997).
  • R. K. Guy, Unsolved Problems in Number Theory, B43.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 97.

Crossrefs

Programs

  • Maple
    with(numtheory); f := proc(n) local i; add((-1)^(n-i)*i!,i=1..n); end; isprime(f(15));
  • Mathematica
    (* This program is not convenient for more than 15 terms *) Reap[For[n = 1, n <= 1000, n++, If[PrimeQ[Sum[(-1)^(n - k) * k!, {k, n}]], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Sep 05 2013 *)
    Position[AlternatingFactorial[Range[200]], ?PrimeQ] // Flatten (* _Eric W. Weisstein, Sep 19 2017 *)

Extensions

661 found independently by Eric W. Weisstein and Rachel Lewis (racheljlewis(AT)hotmail.com); 2653 and 3069 found independently by Chris Nash (nashc(AT)lexmark.com) and Rachel Lewis (racheljlewis(AT)hotmail.com)
3943, 4053, 4998 found by Paul Jobling (paul.jobling(AT)whitecross.com)
8275, 9158 found by team of Rachel Lewis, Paul Jobling and Chris Nash
661! - 660! + 659! - ... was shown to be prime by team of Giovanni La Barbera and others using the Certifix program developed by Marcel Martin, Jul 15 2000 (see link) - Paul Jobling (Paul.Jobling(AT)WhiteCross.com) and Giovanni La Barbera, Aug 02 2000
a(23) = 11164 found by Paul Jobling, Nov 25 2004
Edited by T. D. Noe, Oct 30 2008
Edited by Hans Havermann, Jun 17 2013
a(24) = 43592 from Serge Batalov, Jul 19 2017
a(25) = 59961 from Mark Rodenkirch, Sep 18 2017

A076679 Numbers k such that 3*k! + 1 is prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 10, 13, 23, 25, 32, 38, 40, 47, 96, 3442, 4048, 4522, 4887, 7033, 9528, 12915, 31762, 114482
Offset: 1

Views

Author

Phillip L. Poplin (plpoplin(AT)bellsouth.net), Oct 25 2002

Keywords

Comments

a(25) > 115000. - Serge Batalov, Jun 15 2025

Examples

			k = 6 is here because 3*6! + 1 = 2161 is prime.
		

Crossrefs

Programs

  • PARI
    isok(n) = isprime(3*n! + 1); \\ Michel Marcus, Nov 13 2016
    
  • PFGW
    ABC2 3*$a!+1
    a: from 1 to 1000 // Jinyuan Wang, Feb 05 2020

Extensions

More terms from Serge Batalov, Feb 18 2015
a(20)-a(23) from Roger Karpin, Nov 13 2016
a(24) from Serge Batalov, Jun 15 2025

A126896 Numbers k such that 10*k! + 1 is prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 23, 32, 39, 61, 349, 718, 805, 1025, 1194, 1550, 1774, 3417, 7583
Offset: 1

Views

Author

Parthasarathy Nambi, May 07 2007

Keywords

Comments

a(17) > 2880. - Jinyuan Wang, Feb 05 2020
a(19) > 12000. - Michael S. Branicky, Jul 07 2024

Examples

			k = 4 is a term because 10*4! + 1 = 241 is prime.
		

Crossrefs

Corresponding primes are in A089764.

Programs

  • PARI
    is(k) = ispseudoprime(10*k!+1); \\ Jinyuan Wang, Feb 05 2020

Extensions

a(15)-a(16) from Jinyuan Wang, Feb 05 2020
a(17) from Michael S. Branicky, Apr 16 2023
a(18) from Michael S. Branicky, Jul 07 2024
Previous Showing 21-30 of 111 results. Next