A251260 Expansion of (1 + 2*x + x^2 + x^3) / ((1 - x^2)^2 * (1 - x^3) * (1 - x^4)) in powers of x.
1, 2, 3, 6, 8, 13, 16, 24, 28, 40, 45, 61, 68, 89, 97, 124, 134, 167, 179, 219, 233, 281, 297, 353, 372, 437, 458, 533, 557, 642, 669, 765, 795, 903, 936, 1056, 1093, 1226, 1266, 1413, 1457, 1618, 1666, 1842, 1894, 2086, 2142, 2350, 2411, 2636, 2701, 2944
Offset: 0
Examples
G.f. = 1 + 2*x + 3*x^2 + 6*x^3 + 8*x^4 + 13*x^5 + 16*x^6 + 24*x^7 + ...
Links
- G. C. Greubel, Table of n, a(n) for n = 0..2500
- Index entries for linear recurrences with constant coefficients, signature (0,2,1,0,-2,-2,0,1,2,0,-1).
Programs
-
Magma
m:=50; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 + 2*x+x^2+x^3)/((1-x^2)^2*(1-x^3)*(1-x^4)))); // G. C. Greubel, Aug 03 2018 -
Mathematica
a[ n_] := Quotient[ 5 n^3 + If[ OddQ[n], 66 n^2 + 249 n, 57 n^2 + 204 n] + 288, 288]; a[ n_] := Length @ FindInstance[ {x > u, u > v, v > w, w >= 0, x + u == n + 6, (u + v < x + w && k == 0) || (u + v > x + w && x + u + v + w == 2 k + 1)}, {x, u, v, w, k}, Integers, 10^9]; LinearRecurrence[{0,2,1,0,-2,-2,0,1,2,0,-1},{1,2,3,6,8,13,16,24,28,40,45},60] (* Harvey P. Dale, Jul 16 2025 *)
-
PARI
{a(n) = (5*n^3 + if( n%2, 66*n^2 + 249*n, 57*n^2 + 204*n) + 288) \ 288};
-
PARI
{a(n) = polcoeff( if( n<0, n = -8-n; -(1 + x + 2*x^2 + x^3), 1 + 2*x + x^2 + x^3) / ((1 - x^2)^2 * (1 - x^3) * (1 - x^4)) + x * O(x^n), n)};