A337654 Expansion of H(x)*(1+x^5)/(1-x^2-x^3-x^4) where H(x) = g.f. for A249665.
0, 1, 1, 2, 4, 10, 22, 45, 93, 197, 420, 890, 1878, 3964, 8380, 17724, 37474, 79209, 167426, 353927, 748202, 1581668, 3343519, 7067929, 14941121, 31584586, 66767743, 141142461, 298365531, 630724607, 1333309486, 2818526581, 5958175175, 12595180550, 26625362976, 56284223827
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Maria M. Gillespie, Kenneth G. Monks, and Kenneth M. Monks, Enumerating Anchored Permutations with Bounded Gaps, arXiv:1808.03573 [math.CO], 2018. Also Discrete Math.,343 (2020), #111957. See B(x).
- Index entries for linear recurrences with constant coefficients, signature (2,-1,2,1,1,0,-1,-1).
Crossrefs
Cf. A249665.
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 50); [0] cat Coefficients(R!( x*(1+x^5)/((1+x)*(1-2*x+x^2-2*x^3-x^4-x^5+x^7+x^8)) )); // G. C. Greubel, Sep 23 2024 -
Mathematica
LinearRecurrence[{2,-1,2,1,1,0,-1,-1},{0,1,1,2,4,10,22,45},40] (* Harvey P. Dale, May 04 2023 *)
-
PARI
concat(0, Vec((x^4-x^3+x^2-x+1)*x/(x^8+x^7-x^5-x^4-2*x^3+x^2-2*x+1)+ O(x^40))) \\ Michel Marcus, Oct 11 2020
-
SageMath
def A337654_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( x*(1+x^5)/((1+x)*(1-2*x+x^2-2*x^3-x^4-x^5+x^7+x^8)) ).list() A337654_list(50) # G. C. Greubel, Sep 23 2024
Formula
G.f.: x*(1-x+x^2-x^3+x^4)/(1-2*x+x^2-2*x^3-x^4-x^5+x^7+x^8).
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) + a(n-4) + a(n-5) - a(n-7) - a(n-8) for n>7. - Colin Barker, Oct 11 2020