A038507 a(n) = n! + 1.
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
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).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 763 and Encyclopedia of Combinatorial Structures 834
- T. Mansour and J. West, Avoiding 2-letter signed patterns, arXiv:math/0207204 [math.CO], 2002.
- Romeo 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
- Hisanori Mishima, Factorizations of many number sequences
- Hisanori Mishima, Factorizations of many number sequences
- 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.
- Index entries for sequences related to factorial numbers
Programs
-
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
-
Magma
[Factorial(n) +1: n in [0..25]]; // Vincenzo Librandi, Jul 20 2011
-
Mathematica
Range[0,20]!+1 (* Harvey P. Dale, May 06 2012 *)
-
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
-
Python
from math import factorial def A038507(n): return factorial(n) + 1 # Karl-Heinz Hofmann, Aug 21 2024
-
Sage
[factorial(n) + 1 for n in range(0,24)] # Stefano Spezia, Apr 21 2025
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
Comments