Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #18 Mar 13 2023 16:23:03
%S 2,0,5,2,10,5,18,10,29,18,43,29,62,43,85,62,113,85,147,113,187,147,
%T 233,187,287,233,348,287,417,348,495,417,582,495,678,582,785,678,902,
%U 785,1030,902,1170,1030,1322,1170,1486,1322,1664,1486,1855,1664,2060,1855
%N Expansion of (1 + 2*x^2) / (1 - 2*x^2 - x^3 + 2*x^5 + 2*x^6 - x^8 - 2*x^9 + x^11) in powers of x.
%C The number of quadruples of integers [x, u, v, w] which satisfy x > u > v > w >=0, n+7 = x+u, (u+v < x+w and x+u+v+w is even) or (u+v > x+w and x+u+v+w is odd).
%H G. C. Greubel, <a href="/A254708/b254708.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_11">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,1,0,-2,-2,0,1,2,0,-1).
%F G.f.: (2 + x^2) / (1 - 2*x^2 - x^3 + 2*x^5 + 2*x^6 - x^8 - 2*x^9 + x^11).
%F 0 = a(n) + a(n+1) - a(n+2) - 2*a(n+3) - 2*a(n+4) + 2*a(n+6) + 2*a(n+7) + a(n+8) - a(n+9) - a(n+10) + 3 for all n in Z.
%F a(n+3) - a(n) = 0 if n even else A001859((n+5)/2) for all n in Z.
%F a(n) = A254594(n-2) + 2*A254594(n) for all n in Z.
%F a(n) = -A254707(-9 - n) for all n in Z.
%e G.f. = 2 + 5*x^2 + 2*x^3 + 10*x^4 + 5*x^5 + 18*x^6 + 10*x^7 + 29*x^8 + ...
%t a[ n_] := Quotient[ n^3 + If[ OddQ[n], 10 n^2 + 21 n + 12, 19 n^2 + 108 n + 192], 96];
%t a[ n_] := Module[{m = n}, SeriesCoefficient[ If[ n < 0, m = -9 - n; -1 - 2 x^2, 2 + x^2]/ ((1 - x^2)^2 (1 - x^3) (1 - x^4)), {x, 0, m}]];
%t a[ n_] := Length @ FindInstance[ {x > u, u > v, v > w, w >= 0, x + u == n + 7, (u + v < x + w && x + u + v + w == 2 k) || (u + v > x + w && x + u + v + w == 2 k + 1)}, {x, u, v, w, k}, Integers, 10^9];
%t CoefficientList[Series[(2 + x^2)/(1 - 2*x^2 - x^3 + 2*x^5 + 2*x^6 - x^8 - 2*x^9 + x^11), {x,0,50}], x] (* _G. C. Greubel_, Apr 14 2017 *)
%t LinearRecurrence[{0,2,1,0,-2,-2,0,1,2,0,-1},{2,0,5,2,10,5,18,10,29,18,43},60] (* _Harvey P. Dale_, Mar 13 2023 *)
%o (PARI) {a(n) = (n^3 + if( n%2, 10*n^2 + 21*n + 12, 19*n^2 + 108*n + 192)) \ 96};
%o (PARI) {a(n) = polcoeff( if( n<0, n = -9-n; -1 - 2*x^2, 2 + x^2) / ((1 - x^2)^2 * (1 - x^3) * (1 - x^4)) + x * O(x^n), n)};
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((2 + x^2)/(1-2*x^2-x^3+2*x^5+2*x^6-x^8-2*x^9+x^11))); // _G. C. Greubel_, Aug 03 2018
%Y Cf. A001859, A254707, A254594.
%K nonn,easy
%O 0,1
%A _Michael Somos_, Feb 06 2015