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-10 of 13 results. Next

A038507 a(n) = n! + 1.

Original entry on oeis.org

2, 2, 3, 7, 25, 121, 721, 5041, 40321, 362881, 3628801, 39916801, 479001601, 6227020801, 87178291201, 1307674368001, 20922789888001, 355687428096001, 6402373705728001, 121645100408832001, 2432902008176640001, 51090942171709440001, 1124000727777607680001, 25852016738884976640001
Offset: 0

Views

Author

Keywords

Comments

"For n = 4, 5 and 7, n!+1 is a square. Sierpiński asked if there are any other values of n with this property." p. 82 of Ogilvy and Anderson (see A146968).
Number of {12,12*,1*2,21*,2*1}-avoiding signed permutations in the hyperoctahedral group.
After Wilson's Theorem: if (n+1) is prime then (n+1) is the smallest prime factor of a(n). - Karl-Heinz Hofmann, Aug 21 2024

Examples

			G.f. = 2 + 2*x + 3*x^2 + 7*x^3 + 25*x^4 + 121*x^5 + 721*x^6 + 5041*x^7 + ...
		

References

  • C. Stanley Ogilvy and John T. Anderson, Excursions in Number Theory, Oxford University Press, 1966, p. 82.
  • Wacław Sierpiński, On some unsolved problems of arithmetics, Scripta Mathematica, vol. 25 (1960), p. 125.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Programs

Formula

a(n) = n * (a(n-1) - 1) + 1. - Reinhard Zumkeller, Mar 20 2013
0 = a(n)*(a(n+1) - 5*a(n+2) + 5*a(n+3) - a(n+4)) + a(n+1)*(a(n+1) + a(n+2) - 6*a(n+3) + 2*a(n+4)) + a(n+2)*(3*a(n+2) - a(n+3) - a(n+4)) + a(n+3)*(a(n+3)) if n>=0. - Michael Somos, Apr 23 2014
From Ilya Gutkovskiy, Jan 20 2017: (Start)
E.g.f: exp(x) + 1/(1 - x).
Sum_{n>=0} 1/a(n) = A217702. (End)

Extensions

Additional comments from Jason Earls, Apr 01 2001
Numericana.com URL fixed by Gerard P. Michon, Mar 30 2010
Entry revised by N. J. A. Sloane, Jun 10 2012

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

A104367 Greatest prime factor of A104365(n) = A104350(n) + 1.

Original entry on oeis.org

2, 3, 7, 13, 61, 181, 97, 2521, 7561, 367, 415801, 1247401, 97103, 594311, 2689891, 269, 415147, 1434493, 1099944846001, 13421, 938977307561, 1687166397251, 6121943187511, 13027211250107, 146100174169950001, 1389833, 10603380543703, 2129284819, 1156675078903494150001, 132597517693, 47172675889, 11159737, 20350106034371
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := FactorInteger[1 + Product[FactorInteger[k][[-1, 1]], {k, 1, n}]][[-1, 1]]; Array[a, 76] (* Amiram Eldar, Feb 12 2020 *)

Formula

a(n) = A006530(A104365(n)).

Extensions

Corrected by T. D. Noe, Nov 15 2006

A064144 a(n) is the number of divisors of n!+1.

Original entry on oeis.org

2, 2, 2, 3, 3, 4, 3, 4, 8, 4, 2, 6, 4, 4, 8, 32, 8, 64, 4, 4, 8, 8, 12, 4, 4, 4, 2, 4, 8, 32, 16, 16, 32, 4, 32, 64, 2, 4, 16, 128, 2, 8, 16, 8, 8, 8, 16, 4, 32, 32, 64, 16, 16, 4, 4, 16, 8, 16, 4, 16, 16, 8, 32, 8
Offset: 1

Views

Author

Vladeta Jovovic, Sep 11 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ Print[ DivisorSigma[0, n! + 1]], {n, 1, 40} ]
  • PARI
    a(n) = numdiv(n! + 1); \\ Harry J. Smith, Sep 09 2009
    
  • Python
    from math import factorial
    from sympy import divisor_count
    def A064144(n): return divisor_count(factorial(n)+1) # Chai Wah Wu, Oct 20 2023

Formula

a(n) = tau(n!+1).

Extensions

More terms from Robert G. Wilson v, Oct 04 2001
a(42)-a(64) from Harry J. Smith, Sep 09 2009
Edited by Jon E. Schoenfield, Jun 21 2018

A164314 Largest prime factor of n^2 - 2.

Original entry on oeis.org

2, 7, 7, 23, 17, 47, 31, 79, 7, 17, 71, 167, 97, 223, 127, 41, 23, 359, 199, 439, 241, 31, 41, 89, 337, 727, 23, 839, 449, 137, 73, 1087, 577, 1223, 647, 1367, 103, 31, 47, 73, 881, 1847, 967, 17, 151, 2207, 1151, 2399, 1249, 113, 193, 401, 47, 3023, 1567, 191
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> max(numtheory[factorset](n^2-2)):
    seq(a(n), n=2..60);  # Alois P. Heinz, Jul 22 2017
  • Mathematica
    Table[FactorInteger[n^2 - 2][[-1, 1]], {n, 2, 57}] (* Michael De Vlieger, Jul 22 2017 *)
  • PARI
    a(n) = vecmax(factor(n^2-2)[,1]); \\ Michel Marcus, Jul 22 2017

Formula

a(n) = A006530(A008865(n)).

Extensions

Offset corrected by R. J. Mathar, Aug 21 2009

A056111 Highest proper factor of n!+1.

Original entry on oeis.org

1, 1, 1, 1, 5, 11, 103, 71, 661, 19099, 329891, 1, 36846277, 75024347, 3790360487, 22163972339, 1230752346353, 538105034941, 336967037143579, 1713311273363831, 117876683047, 1188161445853707907, 48869596859895986087, 550042909337978226383, 765041185860961084291
Offset: 0

Views

Author

Henry Bottomley, Jun 12 2000

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Divisors[n!+1][[ -2]]

Formula

a(n) = A038507(n)/A051301(n).

Extensions

Corrected and extended by Dean Hickerson, Aug 30 2001
More terms from Amiram Eldar, Oct 07 2019

A096225 a(0) = 1; for n >= 0, a(n+1) = smallest prime factor of a(n)! + 1.

Original entry on oeis.org

1, 2, 3, 7, 71, 6653, 25469, 15750503
Offset: 0

Views

Author

N. J. A. Sloane, Aug 09 2004

Keywords

Examples

			71!+1 is the product of 6653 and a large prime.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[n_] := Block[{p = PrimePi[a[n - 1]] + 1, r = a[n - 1]! + 1}, While[ Mod[r, Prime[p]] != 0, p++ ]; Prime[p]]; Do[ Print[ a[n]], {n, 7}] (* Robert G. Wilson v, Aug 12 2004 *)
    NestList[FactorInteger[#!+1][[1,1]]&,1,7] (* Harvey P. Dale, Sep 20 2016 *)

Extensions

a(6) and a(7) from Robert G. Wilson v, Aug 12 2004

A362779 Triangular array read by rows: T(n,k) is the greatest prime factor of n!*k + 1, n >= 1, 1 <= k <= n.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 5, 7, 73, 97, 11, 241, 19, 37, 601, 103, 131, 2161, 67, 277, 149, 71, 593, 15121, 20161, 79, 30241, 35281, 661, 7331, 1657, 161281, 449, 241921, 282241, 6863, 269, 2477, 1088641, 1451521, 78887, 2177281, 5281, 2903041, 192113, 329891, 29383, 10886401, 62297, 18144001, 2243, 251501, 29030401, 32659201, 843907
Offset: 1

Views

Author

Joe B. Stephen, May 03 2023

Keywords

Comments

The primes in each row are distinct because n!*k + 1 are coprime for 1 <= k <= n, and hence this array gives a simple proof that there are infinitely many prime numbers.

Examples

			Triangle T(n,k) begins:
  n\k   1    2    3    4    5    6 ...
  1     2
  2     3    5
  3     7   13   19
  4     5    7   73   97
  5    11  241   19   37  601
  6   103  131 2161   67  277  149
  ...
		

Crossrefs

Cf. A002583 (1st column).

Formula

T(n,k) = A006530(A362777(n,k))

A070314 a(n) = P(n!+1)-P(2^n+1) where P(x) is the largest prime factor in x.

Original entry on oeis.org

0, -1, -2, 4, -12, 0, 90, 28, 404, 250, 329850, 39916118, 2834088, 75021616, 3790360374, 46271010, 993974, 956666, 123610842, 1713311273189068, 117876621366, 2703875810364, 93799610095767534, 148139754734068388, 765041185860961083618, 38681321803817920155550
Offset: 0

Views

Author

Benoit Cloitre, May 12 2002

Keywords

Comments

Is it always true that a(n) > 0 for n > 5? More generally, if m is an integer > 2, is there always an integer f(m) such that P(n!+1) > P(m^n+1) for n > f(m) (it seems that f(2) = 5, f(3) = 7, f(4) = 17, ...).

Crossrefs

Programs

  • Mathematica
    gpf[n_] := FactorInteger[n][[-1,1]]; a[n_] := gpf[n!+1] - gpf[2^n+1]; Array[a, 26, 0] (* Amiram Eldar, Apr 23 2025 *)

Formula

a(n) = A002583(n) - A002587(n). - Amiram Eldar, Apr 23 2025

Extensions

Offset changed to 0 and a(0) prepended by Amiram Eldar, Apr 23 2025
Showing 1-10 of 13 results. Next