(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 45); [0] cat Coefficients(R!( x*(1+2*x +4*x^2+2*x^3+x^4)/(1-2*x-x^2+4*x^3-x^4-2*x^5+x^6) )); // G. C. Greubel, Apr 10 2019
(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 45); [0] cat Coefficients(R!( x*(1+2*x +4*x^2+2*x^3+x^4)/(1-2*x-x^2+4*x^3-x^4-2*x^5+x^6) )); // G. C. Greubel, Apr 10 2019
reviewed
approved
proposed
reviewed
editing
proposed
Number of (w,x,y,z) with all terms in {1,...,n} and |w-x| = 2*|x-y| - |y-z|.
G. C. Greubel, <a href="/A212578/b212578.txt">Table of n, a(n) for n = 0..1000</a>
a(n) = 2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6).
G.f.: (x *(1 + 2*x^2 + 4*x^3 2 + 2*x^4 3 + x^54)/(1 - 2*x - x^2 + 4*x^3 - x^4 - 2*x^5 + x^6).
(PARI) my(x='x+O('x^45)); concat([0], Vec(x*(1+2*x+4*x^2+2*x^3+x^4)/(1 -2*x-x^2+4*x^3 -x^4-2*x^5+x^6))) \\ G. C. Greubel, Apr 10 2019
(MAGMA) R<x>:=PowerSeriesRing(Integers(), 45); [0] cat Coefficients(R!( x*(1+2*x +4*x^2+2*x^3+x^4)/(1-2*x-x^2+4*x^3-x^4-2*x^5+x^6) )); // G. C. Greubel, Apr 10 2019
(Sage) (x*(1+2*x+4*x^2+2*x^3+x^4)/(1-2*x-x^2+4*x^3-x^4-2*x^5+x^6) ).series(x, 45).coefficients(x, sparse=False) # G. C. Greubel, Apr 10 2019
proposed
editing
editing
proposed
<a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1, 2, 1, -4, 1, 2, -1).
LinearRecurrence[{1, 2, 1, -4, 1, 2, -1}, {0, 1, 4, 13, 28, 55, 92}, 45] (* signature corrected by _Georg Fischer_, Apr 10 2019 *)
approved
editing
editing
approved
<a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1, 2, -4, 1, 2, -1).
approved
editing
editing
approved