login
A337654
Expansion of H(x)*(1+x^5)/(1-x^2-x^3-x^4) where H(x) = g.f. for A249665.
2
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,4
LINKS
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).
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
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 *)
PROG
(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
(Magma)
R<x>:=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
(SageMath)
def A337654_list(prec):
P.<x> = 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
CROSSREFS
Cf. A249665.
Sequence in context: A005306 A075898 A360631 * A369491 A274313 A291397
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 29 2020
STATUS
approved