A137234 Expansion of g.f. 1/((1-x)^2*(1 - 3*x + 2*x^2 - x^3)).
1, 5, 16, 43, 107, 257, 607, 1422, 3318, 7727, 17978, 41810, 97214, 226014, 525439, 1221519, 2839710, 6601549, 15346765, 35676927, 82938821, 192809396, 448227496, 1042002541, 2422362052, 5631308596, 13091204252, 30433357644, 70748973053
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Richard Choulet, Curtz-like transformation.
- Index entries for linear recurrences with constant coefficients, signature (5,-9,8,-4,1).
Programs
-
Magma
I:=[1,5,16,43,107]; [n le 5 select I[n] else 5*Self(n-1) -9*Self(n-2) +8*Self(n-3) -4*Self(n-4) +Self(n-5): n in [1..41]]; // G. C. Greubel, Apr 19 2021
-
Mathematica
LinearRecurrence[{5,-9,8,-4,1}, {1,5,16,43,107}, 41] (* G. C. Greubel, Apr 19 2021 *) CoefficientList[Series[1/((1-x)^2(1-3x+2x^2-x^3)),{x,0,30}],x] (* Harvey P. Dale, Jun 07 2021 *)
-
Sage
@CachedFunction def A095263(n): return sum(binomial(n+j+2, 3*j+2) for j in (0..n//2)) def A137234(n): return -(n+3) + sum( (-1)^j*(4-j)*A095263(n-j) for j in (0..2)) [A137234(n) for n in (0..40)] # G. C. Greubel, Apr 19 2021
Formula
O.g.f: 1/((1-z)^2*(1 - 3*z + 2*z^2 - z^3)).
a(n) = -(n+3) + Sum_{j=0..2} (-1)^j*(4-j)*A095263(n-j). - G. C. Greubel, Apr 19 2021
Comments