A129891 Sum of coefficients of polynomials defined in comments lines.
1, 2, 4, 9, 20, 44, 96, 209, 455, 991, 2159, 4704, 10249, 22330, 48651, 105997, 230938, 503150, 1096225, 2388372, 5203604, 11337218, 24700671, 53815949, 117250109, 255455647, 556567394, 1212606837, 2641935832, 5756049469, 12540844137
Offset: 0
Keywords
References
- Paul Curtz, Gazette des Mathématiciens, 1992, no. 52, p. 44.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x+x^3)/(1-3*x+2*x^2-x^4) )); // G. C. Greubel, Oct 24 2023 -
Maple
a:= n-> (Matrix([1, 1, 0, 1]). Matrix(4, (i, j)-> if i=j-1 then 1 elif j=1 then [3, -2, 0, 1][i] else 0 fi)^n)[1, 1]: seq(a(n), n=0..50); # Alois P. Heinz, Oct 14 2009
-
Mathematica
u[n_ /; n < 3] = 1; u[n_] := n-1; p[0][x_] := u[0]; p[n_][x_] := p[n][x] = u[n] + x*Sum[ u[i]*p[n-i-1][x] , {i, 0, n-1}] // Expand; row[n_] := CoefficientList[ p[n][x], x]; Table[row[n] // Total, {n, 0, 30}] (* Jean-François Alcover, Oct 02 2012 *)
-
SageMath
def A129891_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( (1-x+x^3)/(1-3*x+2*x^2-x^4) ).list() A129891_list(40) # G. C. Greubel, Oct 24 2023
Formula
G.f.: (1-x+x^3)/(1-3*x+2*x^2-x^4). - Alois P. Heinz, Oct 14 2009
Extensions
Edited by N. J. A. Sloane, Jul 05 2007
More terms from Alois P. Heinz, Oct 14 2009
Comments