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.

A052572 Expansion of e.g.f.: (1+2*x-2*x^2)/(1-x)^2.

Original entry on oeis.org

1, 4, 10, 36, 168, 960, 6480, 50400, 443520, 4354560, 47174400, 558835200, 7185024000, 99632332800, 1482030950400, 23538138624000, 397533007872000, 7113748561920000, 134449847820288000, 2676192208994304000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n) equals the permanent of the (n+1) X (n+1) matrix whose entry directly below the entry in the top right corner is 3, and all of whose other entries are 1. - John M. Campbell, May 25 2011
In factorial base representation (A007623) the terms are written as: 1, 20, 120, 1200, 12000, 120000, ... From a(2) = 10 = "120" onward each term begins always with "120", followed by n-2 additional zeros. - Antti Karttunen, Sep 24 2016

Crossrefs

Essentially twice A038720.
Row 7 of A276955, from a(2)=10 onward.
Cf. sequences with formula (n + k)*n! listed in A282466.
Cf. A000142.

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)