A052572 Expansion of e.g.f.: (1+2*x-2*x^2)/(1-x)^2.
1, 4, 10, 36, 168, 960, 6480, 50400, 443520, 4354560, 47174400, 558835200, 7185024000, 99632332800, 1482030950400, 23538138624000, 397533007872000, 7113748561920000, 134449847820288000, 2676192208994304000
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..440
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 515
- Index entries for sequences related to factorial base representation
Crossrefs
Programs
-
Magma
A052572:= func< n | n eq 0 select 1 else (n+3)*Factorial(n) >; // G. C. Greubel, May 11 2025
-
Maple
spec := [S,{S=Prod(Union(Z,Z,Sequence(Z)),Sequence(Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
Mathematica
With[{nn=20},CoefficientList[Series[(1+2x-2x^2)/(1-x)^2,{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Jul 03 2020 *) Table[If[n==0, 1, (n+3)*n!], {n,0,30}] (* G. C. Greubel, May 11 2025 *)
-
SageMath
def A052572(n): return 1 if n==0 else (n+3)*factorial(n) # G. C. Greubel, May 11 2025
Formula
E.g.f.: (1 + 2*x - 2*x^2)/(1 - x)^2.
Recurrence: (n+2)*a(n) = n*(n+3)*a(n-1), with a(0) = 1, a(1) = 4, a(2) = 10.
a(n) = (n+3)*n! for n > 0.
For n <= 1, a(n) = (n+1)^2, for n > 1, a(n) = (n+1)! + 2*n! - Antti Karttunen, Sep 24 2016
From Amiram Eldar, Nov 06 2020: (Start)
Sum_{n>=0} 1/a(n) = e - 4/3.
Sum_{n>=0} (-1)^n/a(n) = 8/3 - 5/e. (End)
Comments