[go: up one dir, main page]

login
Search: a056111 -id:a056111
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = n! + 1.
(Formerly N0107)
+10
91
2, 2, 3, 7, 25, 121, 721, 5041, 40321, 362881, 3628801, 39916801, 479001601, 6227020801, 87178291201, 1307674368001, 20922789888001, 355687428096001, 6402373705728001, 121645100408832001
OFFSET
0,1
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
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).
LINKS
T. Mansour and J. West, Avoiding 2-letter signed patterns, arXiv:math/0207204 [math.CO], 2002.
R. Mestrovic, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv preprint arXiv:1202.3670 [math.HO], 2012-2023. - From N. J. A. Sloane, Jun 13 2012
Gerard P. Michon, Wilson's Theorem
Andrew Walker, Factors of n! +- 1
Arthur T. White, Ringing the changes, Math. Proc. Cambridge Philos. Soc. 94 (1983), no. 2, 203-215.
Robert G. Wilson v, Explicit factorizations
Jun Yan, Results on pattern avoidance in parking functions, arXiv:2404.07958 [math.CO], 2024. See p. 4.
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)
EXAMPLE
G.f. = 2 + 2*x + 3*x^2 + 7*x^3 + 25*x^4 + 121*x^5 + 721*x^6 + 5041*x^7 + ...
MATHEMATICA
Range[0, 20]!+1 (* Harvey P. Dale, May 06 2012 *)
PROG
(Magma) [Factorial(n) +1: n in [0..25]]; // Vincenzo Librandi, Jul 20 2011
(Maxima) A038507(n):= n!+1$
makelist(A038507(n), n, 0, 30); /* Martin Ettl, Nov 03 2012 */
(PARI) a(n)=n!+1 \\ Charles R Greathouse IV, Nov 20 2012
(Haskell)
a038507 = (+ 1) . a000142
a038507_list = 2 : f 1 2 where
f x y = z : f (x + 1) z where z = x * (y - 1) + 1
-- Reinhard Zumkeller, Mar 20 2013
(Python)
from math import factorial
def A038507(n): return factorial(n) + 1 # Karl-Heinz Hofmann, Aug 21 2024
KEYWORD
nonn,easy,nice
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
STATUS
approved
Largest prime factor of n! + 1.
(Formerly M0294 N0312)
+10
13
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,1
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
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).
LINKS
Georg Fischer, Table of n, a(n) for n = 0..139 (first 101 terms originally derived from Hisanori Mishima's data by T. D. Noe)
A. Borning, Some results for k!+-1 and 2.3.5...p+-1, Math. Comp., 26 (1972), 567-570.
P. Erdős and C. L. Stewart, On the greatest and least prime factors of n! + 1, J. London Math. Soc. (2) 13:3 (1976), pp. 513-519.
M. Kraitchik, On the divisibility of factorials, Scripta Math., 14 (1948), 24-26 (but beware errors). [Annotated scanned copy]
Li Lai, On the largest prime divisor of n! + 1, arXiv:2103.14894 [math.NT], 2021.
H. P. Robinson and N. J. A. Sloane, Correspondence, 1971-1972
Blake C. Stacey, Equiangular Lines, Ch. 1, A First Course in the Sporadic SICs, SpringerBriefs in Math. Phys. (2021) Vol. 41, see page 5.
R. G. Wilson v, Explicit factorizations
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
EXAMPLE
(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
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 *)
PROG
(PARI) a(n)=my(f=factor(n!+1)[, 1]); f[#f] \\ Charles R Greathouse IV, Dec 05 2012
(Magma) [Maximum(PrimeDivisors(Factorial(n)+1)): n in [0..30]]; // Vincenzo Librandi, Feb 14 2020
KEYWORD
nonn,nice
EXTENSIONS
More terms from Robert G. Wilson v, Aug 01 2000
Corrected by Jud McCranie, Jan 03 2001
STATUS
approved

Search completed in 0.007 seconds