A003422 Left factorials: !n = Sum_{k=0..n-1} k!.
0, 1, 2, 4, 10, 34, 154, 874, 5914, 46234, 409114, 4037914, 43954714, 522956314, 6749977114, 93928268314, 1401602636314, 22324392524314, 378011820620314, 6780385526348314, 128425485935180314, 2561327494111820314, 53652269665821260314, 1177652997443428940314
Offset: 0
Examples
!5 = 0! + 1! + 2! + 3! + 4! = 1 + 1 + 2 + 6 + 24 = 34. x + 2*x^2 + 4*x^3 + 10*x^4 + 34*x^5 + 154*x^6 + 874*x^7 + 5914*x^8 + 46234*x^9 + ... From _Arkadiusz Wesolowski_, Aug 06 2012: (Start) Illustration of initial terms: . . o o o o o . o o o o . o o o o o o . ooo ooo ooo ooo . oooo oooo oooo oooo oooo oooo . . 1 2 4 10 34 . (End) The tree graph. The total number of vertices at each stage is 1, 2, 4, 10, ... 0 0 |/ 0-0 / 0-0 \ 0-0 |\ 0 0 - _Jon Perry_, Jan 27 2013
References
- Richard K. Guy, Unsolved Problems Number Theory, Section B44.
- D. Kurepa, On the left factorial function !n. Math. Balkanica 1 1971 147-153.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 0..100
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), Article 00.1.5.
- Bernd C. Kellner, Some remarks on Kurepa's left factorial, arXiv:math/0410477 [math.NT], 2004.
- D. Kurepa, On the left factorial function !N, Math. Balkanica 1 (1971), 147-153. (Annotated scanned copy).
- T. Mansour and J. West, Avoiding 2-letter signed patterns, arXiv:math/0207204 [math.CO], 2002.
- Romeo Meštrović, Variations of Kurepa's left factorial hypothesis, arXiv preprint arXiv:1312.7037 [math.NT], 2013.
- Romeo Meštrović, The Kurepa-Vandermonde matrices arising from Kurepa's left factorial hypothesis, Filomat 29:10 (2015), 2207-2215; DOI 10.2298/FIL1510207M.
- Hisanori Mishima, Factorizations of many number sequences.
- Hisanori Mishima, Factorizations of many number sequences
- F. J. Papp, Letter to N. J. A. Sloane, Nov 1974.
- Jon Perry, Sum of Factorials. [Broken link?]
- Aleksandar Petojevic, On Kurepa's hypothesis for the left factorial, Filomat, Vol. 12, No. 1, 1998.
- Alexsandar Petojevic, The Function vM_m(s; a; z) and Some Well-Known Sequences, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7.
- Aleksandar Petojevic, The {K_i(z)}_{i=1..oo} functions, Rocky Mtn. J. Math., 36 (2006), 1637-1650.
- Aleksandar Petojević, Marjana Gorjanac Ranitović, Dragan Rastovac, and Milinko Mandić, The Golden Ratio, Factorials, and the Lambert W Function, Journal of Integer Sequences, Vol. 27 (2024), Article 24.5.7.
- Eric Weisstein's World of Mathematics, Factorial Sums.
- Eric Weisstein's World of Mathematics, Left Factorial.
- Eric Weisstein's World of Mathematics, Repunit.
- Wikipedia, Factorial number system.
- Miodrag Zivkovic, The number of primes sum_{i=1..n} (-1)^(n-i)*i! is finite, Math. Comp. 68 (1999), pp. 403-409.
- Index entries for sequences related to factorial numbers.
Crossrefs
Programs
-
Haskell
a003422 n = a003422_list !! n a003422_list = scanl (+) 0 a000142_list -- Reinhard Zumkeller, Dec 27 2011
-
Maple
A003422 := proc(n) local k; add(k!,k=0..n-1); end proc: # Alternative, using the Charlier polynomials A137338: C := proc(n, x) option remember; if n > 0 then (x-n)*C(n-1, x) - n*C(n-2, x) elif n = 0 then 1 else 0 fi end: A003422 := n -> (-1)^(n+1)*C(n-1, -1): seq(A003422(n), n=0..22); # Peter Luschny, Nov 28 2018 # third Maple program: a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+(n-1)!) end: seq(a(n), n=0..23); # Alois P. Heinz, Feb 24 2022
-
Mathematica
Table[Sum[i!, {i, 0, n - 1}], {n, 0, 20}] (* Stefan Steinerberger, Mar 31 2006 *) Join[{0}, Accumulate[Range[0, 25]!]] (* Harvey P. Dale, Nov 19 2011 *) a[0] = 0; a[1] = 1; a[n_] := a[n] = n*a[n - 1] - (n - 1)*a[n - 2]; Array[a, 23, 0] (* Robert G. Wilson v, Jun 15 2013 *) a[n_] := (-1)^n*n!*Subfactorial[-n-1]-Subfactorial[-1]; Table[a[n] // FullSimplify, {n, 0, 22}] (* Jean-François Alcover, Jan 09 2014 *) RecurrenceTable[{a[n] == n a[n - 1] - (n - 1) a[n - 2], a[0] == 0, a[1] == 1}, a, {n, 0, 10}] (* Eric W. Weisstein, Jan 11 2019 *) Range[0, 20]! CoefficientList[Series[(ExpIntegralEi[1] - ExpIntegralEi[1 - x]) Exp[x - 1], {x, 0, 20}], x] (* Eric W. Weisstein, Jan 11 2019 *) Table[(-1)^n n! Subfactorial[-n - 1] - Subfactorial[-1], {n, 0, 20}] // FullSimplify (* Eric W. Weisstein, Jan 11 2019 *) Table[(I Pi + ExpIntegralEi[1] + (-1)^n n! Gamma[-n, -1])/E, {n, 0, 20}] // FullSimplify (* Eric W. Weisstein, Jan 11 2019 *)
-
Maxima
makelist(sum(k!,k,0,n-1), n, 0, 20); /* Stefano Spezia, Jan 11 2019 */
-
PARI
a003422(n)=sum(k=0,n-1,k!) \\ Charles R Greathouse IV, Jun 15 2011
-
Python
from itertools import count, islice def A003422_gen(): # generator of terms yield from (0,1) c, f = 1, 1 for n in count(1): yield (c:= c + (f:= f*n)) A003422_list = list(islice(A003422_gen(),20)) # Chai Wah Wu, Jun 22 2022
-
Python
def a(n): if n == 0: return 0 s = f = 1 for k in range(1, n): f *= k s += f return round(s) print([a(n) for n in range(24)]) # Peter Luschny, Mar 05 2024
Formula
D-finite with recurrence: a(n) = n*a(n - 1) - (n - 1)*a(n - 2). - Henry Bottomley, Feb 28 2001
Sequence is given by 1 + 1*(1 + 2*(1 + 3*(1 + 4*(1 + ..., terminating in n*(1)...). - Jon Perry, Jun 01 2004
a(n) = Sum_{k=0..n-1} P(n, k) / C(n, k). - Ross La Haye, Sep 20 2004
E.g.f.: (Ei(1) - Ei(1 - x))*exp(-1 + x) where Ei(x) is the exponential integral. - Djurdje Cvijovic and Aleksandar Petojevic, Apr 11 2000
a(n) = Integral_{x = 0..oo} [(x^n - 1)/(x - 1)]*exp(-x) dx. - Gerald McGarvey, Oct 12 2007
A007489(n) = !(n + 1) - 1 = a(n + 1) - 1. - Artur Jasinski, Nov 08 2007. Typos corrected by Antti Karttunen, Nov 29 2013
Starting (1, 2, 4, 10, 34, 154, ...), = row sums of triangle A135722. - Gary W. Adamson, Nov 25 2007
a(n) = a(n - 1) + (n - 1)! for n >= 2. - Jaroslav Krizek, Jun 16 2009
E.g.f. A(x) satisfies the differential equation A'(x) = A(x) + 1/(1 - x). - Vladimir Kruchinin, Jan 19 2011
a(n + 1) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A182386(k) for k = 0, 1, ..., n. - Michael Somos, Apr 27 2012
From Sergei N. Gladkovskii, May 09 2013 to Oct 22 2013: (Start)
Continued fractions:
G.f.: x/(1-x)*Q(0) where Q(k) = 1 + (2*k + 1)*x/( 1 - 2*x*(k+1)/(2*x*(k+1) + 1/Q(k+1))).
G.f.: G(0)*x/(1-x)/2 where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))).
G.f.: 2*x/(1-x)/G(0) where G(k) = 1 + 1/(1 - 1/(1 - 1/(2*x*(k+1)) + 1/G(k+1))).
G.f.: W(0)*x/(1+sqrt(x))/(1-x) where W(k) = 1 + sqrt(x)/(1 - sqrt(x)*(k+1)/(sqrt(x)*(k+1) + 1/W(k+1))).
G.f.: B(x)*(1+x)/(1-x) where B(x) is the g.f. of A153229.
G.f.: x/(1-x) + x^2/(1-x)/Q(0) where Q(k) = 1 - 2*x*(2*k+1) - x^2*(2*k+1)*(2*k+2)/(1 - 2*x*(2*k+2) - x^2*(2*k+2)*(2*k+3)/Q(k+1)).
G.f.: x*(1+x)*B(x) where B(x) is the g.f. of A136580. (End)
a(n) = (-1)^(n+1)*C(n-1, -1) where C(n, x) are the Charlier polynomials (with parameter a=1) as given in A137338. (Evaluation at x = 1 gives A232845.) - Peter Luschny, Nov 28 2018
a(n) = (a(n-3)*(n-2)^2*(n-3)! + a(n-1)^2)/a(n-2) (empirical). - Gary Detlefs, Feb 25 2022
a(n) = signum(n)/b(1,n) with b(i,n) = i - [iMohammed Bouras, Sep 07 2022
Sum_{n>=1} 1/a(n) = A357145. - Amiram Eldar, Oct 01 2022
Comments