OFFSET
1,1
COMMENTS
Generating polynomial is Schur's polynomial of degree 3. Schur's n-degree polynomials are the first n terms of the series expansion of the e^x function. All polynomials are irreducible and belong to the An alternating Galois transitive group if n is divisible by 4 or to the Sn symmetric Galois Group otherwise (proof: Schur, 1930).
Number of terms < 10^k: 0, 1, 4, 11, 26, 57, 124, 270, 583, 1258, 2713, 5847, 12598, 27143, 58479, ... - Muniru A Asiru, Jan 13 2018
For n > 1, a(n-1) is the number of ternary strings of length n that contain at most one 1 and at most two 2s. For example, for n=3, a(2)=19 since from the 27 ternary strings of length 3 we exclude 110 (3 of this type), 112 (3 of this type), 111 and 222. - Enrique Navarrete, Apr 16 2025
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(8-13*x+11*x^2-3*x^3)/(1-x)^4. - Colin Barker, Apr 17 2012
E.g.f.: (1+x+x^2/2)*(1+x)*exp(x) - 3x - 1. - Enrique Navarrete, Apr 16 2025
MAPLE
A127873 := [seq((n^3)/2+(3*n^2)/2+3*n+3, n=1..10^3)]; # Muniru A Asiru, Jan 13 2018
MATHEMATICA
Table[3 + 3 x + (3 x^2)/2 + x^3/2, {x, 41}]
Rest@ CoefficientList[ Series[-x (3 x^3 -11 x^2 +13 x - 8)/(x -1)^4, {x, 0, 41}], x] (* or *)
LinearRecurrence[{4, -6, 4, -1}, {8, 19, 39, 71}, 41] (* Robert G. Wilson v, Jan 06 2018 *)
PROG
(PARI) a(n)=n^3/2+3*n*(n+2)/2+3 \\ Charles R Greathouse IV, May 15 2013
(GAP) A127873 := List([1..10^3], n->(n^3)/2+(3*n^2)/2+3*n+3); # Muniru A Asiru, Jan 13 2018
(Magma) [(n^3)/2 + (3*n^2)/2 + 3*n + 3: n in [0..50]]; // Vincenzo Librandi, Jan 14 2018
(Python)
def A127873(n): return (n*(n*(n+3)+6)>>1)+3 # Chai Wah Wu, Jul 12 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Feb 04 2007
STATUS
approved
