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 11-20 of 91 results. Next

A002582 Largest prime factor of n! - 1.

Original entry on oeis.org

1, 5, 23, 17, 719, 5039, 1753, 2999, 125131, 7853, 479001599, 3593203, 87178291199, 1510259, 6880233439, 256443711677, 478749547, 78143369, 19499250680671, 4826713612027, 170006681813, 498390560021687969, 991459181683, 114776274341482621993
Offset: 2

Views

Author

Keywords

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
    [1] cat [Maximum(PrimeDivisors(Factorial(n)-1)): n in [3..30]]; // Vincenzo Librandi, Feb 14 2020
  • Mathematica
    Table[FactorInteger[n! - 1][[-1, 1]], {n, 2, 25}] (* Harvey P. Dale, Aug 29 2011 *)
  • PARI
    a(n)=if(n>2,my(f=factor(n!-1)[,1]);f[#f],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 and lim sup a(n)/n > 2. - Charles R Greathouse IV, Dec 05 2012

Extensions

More terms from Robert G. Wilson v, Aug 01 2000

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

A085692 Brocard's problem: squares which can be written as n!+1 for some n.

Original entry on oeis.org

25, 121, 5041
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jul 18 2003

Keywords

Comments

Next term, if it exists, is greater than 10^850. - Sascha Kurz, Sep 22 2003
No more terms < 10^20000. - David Wasserman, Feb 08 2005
The problem of whether there are any other terms in this sequence, Brocard's problem, has been unsolved since 1876. The known calculations give a(4) > (10^9)! = factorial(10^9). - Stefan Steinerberger, Mar 19 2006
I wrote a similar program sieving against the 40 smallest primes larger than 4*10^9 and can report that a(4) > factorial(4*10^9+1). In other words, it's now known that the only n <= 4*10^9 for which n!+1 is a square are 4, 5 and 7. C source code available on request. - Tim Peters (tim.one(AT)comcast.net), Jul 02 2006
Robert Matson claims to have verified that 4, 5, and 7 are the only values of n <= 10^12 for which n!+1 is a square. This implies that the next term, if it exists, is greater than (10^12+1)! ~ 1.4*10^11565705518115. - David Radcliffe, Oct 28 2019

Examples

			   5^2 =   25 = 4! + 1;
  11^2 =  121 = 5! + 1;
  71^2 = 5041 = 7! + 1.
		

References

  • R. Guy, "Unsolved Problems in Number Theory", 3rd edition, D25
  • Clifford A. Pickover, A Passion for Mathematics (2005) at 69, 306.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 19.

Crossrefs

A085692, A146968, A216071 are all essentially the same sequence. - N. J. A. Sloane, Sep 01 2012

Programs

  • Mathematica
    Select[Range[0,100]!+1,IntegerQ[Sqrt[#]] &] (* Stefano Spezia, Jul 02 2025 *)
  • PARI
    A085692=select( issquare, vector(99,n,n!+1)) \\ M. F. Hasler, Nov 20 2018

Formula

a(n) = A216071(n)^2 = A146968(n)!+1 = A038507(A146968(n)). - M. F. Hasler, Nov 20 2018

A002585 Largest prime factor of 1 + (product of first n primes).

Original entry on oeis.org

3, 7, 31, 211, 2311, 509, 277, 27953, 703763, 34231, 200560490131, 676421, 11072701, 78339888213593, 13808181181, 18564761860301, 19026377261, 525956867082542470777, 143581524529603, 2892214489673, 16156160491570418147806951, 96888414202798247, 1004988035964897329167431269
Offset: 1

Views

Author

Keywords

Comments

Based on Euclid's proof that there are infinitely many primes.
The products of the first primes are called primorial numbers. - Franklin T. Adams-Watters, Jun 12 2014

References

  • M. Kraitchik, On the divisibility of factorials, Scripta Math., 14 (1948), 24-26 (but beware errors).
  • M. Kraitchik, Introduction à la Théorie des Nombres. Gauthier-Villars, Paris, 1952, p. 2.
  • 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

  • Mathematica
    FactorInteger[#][[-1,1]]&/@Rest[FoldList[Times,1,Prime[Range[30]]]+1] (* Harvey P. Dale, Apr 10 2012 *)
  • PARI
    a(n)=my(f=factor(prod(i=1,n,prime(i))+1)[,1]); f[#f] \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = A006530(A006862(n)). - Amiram Eldar, Feb 13 2020

Extensions

More terms from Labos Elemer, May 02 2000
More terms from Robert G. Wilson v, Mar 24 2001
Terms up to a(81) in b-file added by Sean A. Irvine, Apr 19 2014
Terms a(82)-a(87) in b-file added by Amiram Eldar, Feb 13 2020
Terms a(88)-a(98) in b-file added by Max Alekseyev, Aug 26 2021

A005095 a(n) = n! + n.

Original entry on oeis.org

1, 2, 4, 9, 28, 125, 726, 5047, 40328, 362889, 3628810, 39916811, 479001612, 6227020813, 87178291214, 1307674368015, 20922789888016, 355687428096017, 6402373705728018, 121645100408832019, 2432902008176640020, 51090942171709440021
Offset: 0

Views

Author

Keywords

Comments

Every infinite, increasing, integer arithmetic progression meets this sequence infinitely often. - John Abbott (abbott(AT)dima.unige.it), Mar 06 2003
Sum(A010051(k): A038507(n) < k <= a(n)) = 0. - Reinhard Zumkeller, Jul 10 2009
Largest k such that (k!-n!)/(k-n) is an integer. - Derek Orr, Apr 02 2014

Crossrefs

Cf. A135723.
Cf. A090786. - Reinhard Zumkeller, Jul 10 2009

Programs

Formula

E.g.f.: x*exp(x) + 1/(1-x). - Len Smiley, Dec 05 2001
Row sums of triangle A135723. - Gary W. Adamson, Nov 25 2007
(n-1)*(n-3)*a(n) -n*(n^2-3*n+1)*a(n-1) +n*(n-1)*(n-2)*a(n-2)=0. - R. J. Mathar, Oct 30 2015
a(n) +(-n-3)*a(n-1) +3*(n)*a(n-2) +(-3*n+5)*a(n-3) +(n-3)*a(n-4)=0. - R. J. Mathar, Oct 30 2015

A054989 Number of prime divisors of -1 + (product of first n primes).

Original entry on oeis.org

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

Views

Author

Arne Ring (arne.ring(AT)epost.de), May 30 2000

Keywords

Examples

			a(4)=2 because 2*3*5*7 - 1 = 209 = 11*19
		

Crossrefs

Programs

  • Mathematica
    a[q_] := Module[{x, n}, x=FactorInteger[Product[Table[Prime[i], {i, q}][[j]], {j, q}]-1]; n=Length[x]; Sum[Table[x[[i]][[2]], {i, n}][[j]], {j, n}]]
    PrimeOmega[#] & /@ (FoldList[Times, Prime[Range[81]]] - 1) (* Harvey P. Dale, Mar 11 2017 *)

Extensions

More terms from Robert G. Wilson v, Mar 24 2001
a(42)-a(81) from Charles R Greathouse IV, May 07 2011
a(82)-a(87) from Amiram Eldar, Oct 03 2019

A054990 Number of prime divisors of n! + 1 (counted with multiplicity).

Original entry on oeis.org

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

Views

Author

Arne Ring (arne.ring(AT)epost.de), May 30 2000

Keywords

Comments

The smallest k! with n prime factors occurs for n in A060250.
103!+1 = 27437*31084943*C153, so a(103) is unknown until this 153-digit composite is factored. a(104) = 4 and a(105) = 6. - Rick L. Shepherd, Jun 10 2003

Examples

			a(2)=2 because 4! + 1 = 25 = 5*5
		

Crossrefs

Cf. A000040 (prime numbers), A001359 (twin primes).
Cf. A066856 (number of distinct prime divisors of n!+1), A084846 (mu(n!+1)).

Programs

  • Mathematica
    a[q_] := Module[{x, n}, x=FactorInteger[q!+1]; n=Length[x]; Sum[Table[x[[i]][[2]], {i, n}][[j]], {j, n}]]
    A054990[n_Integer] := PrimeOmega[n! + 1]; Table[A054990[n], {n,100}] (* Vladimir Joseph Stephan Orlovsky, Jul 22 2011 *)
  • PARI
    for(n=1,64,print1(bigomega(n!+1),","))

Extensions

More terms from Robert G. Wilson v, Mar 23 2001
More terms from Rick L. Shepherd, Jun 10 2003

A054988 Number of prime divisors of 1 + (product of first n primes), with multiplicity.

Original entry on oeis.org

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

Views

Author

Arne Ring (arne.ring(AT)epost.de), May 30 2000

Keywords

Comments

Prime divisors are counted with multiplicity. - Harvey P. Dale, Oct 23 2020
It is an open question as to whether omega(p#+1) = bigomega(p#+1) = a(n); that is, as to whether the Euclid numbers are squarefree. Any square dividing p#+1 must exceed 2.5*10^15 (see Vardi, p. 87). - Sean A. Irvine, Oct 21 2023

Examples

			a(6)=2 because 2*3*5*7*11*13+1 = 30031 = 59 * 509.
		

References

  • Ilan Vardi, Computational Recreations in Mathematica, Addison-Wesley, 1991.

Crossrefs

Programs

  • Maple
    A054988 := proc(n)
        numtheory[bigomega](1+mul(ithprime(i),i=1..n)) ;
    end proc:
    seq(A054988(n),n=1..20) ; # R. J. Mathar, Mar 09 2022
  • Mathematica
    a[q_] := Module[{x, n}, x=FactorInteger[Product[Table[Prime[i], {i, q}][[j]], {j, q}]+1]; n=Length[x]; Sum[Table[x[[i]][[2]], {i, n}][[j]], {j, n}]]
    PrimeOmega[#+1]&/@FoldList[Times,Prime[Range[90]]] (* Harvey P. Dale, Oct 23 2020 *)
  • PARI
    a(n) = bigomega(1+prod(k=1, n, prime(k))); \\ Michel Marcus, Mar 07 2022

Formula

a(n) = Omega(1 + Product_{k=1..n} prime(k)). - Wesley Ivan Hurt, Mar 06 2022
a(n) = A001222(A006862(n)). - Michel Marcus, Mar 07 2022
a(n) = 1 iff n is in A014545. - Bernard Schott, Mar 07 2022

Extensions

More terms from Robert G. Wilson v, Mar 24 2001
a(44)-a(81) from Charles R Greathouse IV, May 07 2011
a(82)-a(87) from Amiram Eldar, Oct 03 2019

A104365 a(n) = A104350(n) + 1.

Original entry on oeis.org

2, 3, 7, 13, 61, 181, 1261, 2521, 7561, 37801, 415801, 1247401, 16216201, 113513401, 567567001, 1135134001, 19297278001, 57891834001, 1099944846001, 5499724230001, 38498069610001, 423478765710001, 9740011611330001
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    FoldList[Times, Array[FactorInteger[#][[-1, 1]] &, 30]] + 1 (* Amiram Eldar, Apr 08 2024 *)

Formula

a(n) = (a(n-1) - 1) * A006530(n) + 1 for n>1, a(1) = 0;

A051342 Smallest prime factor of 1 + (product of first n primes).

Original entry on oeis.org

3, 7, 31, 211, 2311, 59, 19, 347, 317, 331, 200560490131, 181, 61, 167, 953, 73, 277, 223, 54730729297, 1063, 2521, 22093, 265739, 131, 2336993, 960703, 2297, 149, 334507, 5122427, 1543, 1951, 881, 678279959005528882498681487, 87549524399, 23269086799180847
Offset: 1

Views

Author

Keywords

Comments

Based on Euclid's proof that there are infinitely many primes.

Crossrefs

Programs

  • Maple
    a:= proc(n)
    local N, F, i;
      N:= 1 + mul(ithprime(i),i=1..n);
      F:= select(type,map(t->t[1],ifactors(N,easy)[2]),integer);
    if nops(F) >= 1 then return min(F) fi;
      min(map(t->t[1],ifactors(N)[2]))
    end proc:
    seq(a(n),n=1..40); # Robert Israel, Oct 19 2014
  • Mathematica
    Map[FactorInteger,
       Table[Product[Prime[n], {n, 1, m}] + 1, {m, 1, 36}]][[All,
    1]][[All, 1]] (* Geoffrey Critzer, Oct 19 2014 *)
    FactorInteger[#][[1,1]]&/@(FoldList[Times,Prime[Range[40]]]+1) (* Harvey P. Dale, Oct 08 2021 *)
  • PARI
    a(n) = factor(1 + prod(i=1, n, prime(i)))[1, 1]; \\ Michel Marcus, Dec 10 2013

Formula

a(n) = A020639(1+A002110(n)).

Extensions

One more term from Michel Marcus, Dec 10 2013
Previous Showing 11-20 of 91 results. Next