login
A181984
INVERT transform of A028310.
1
1, 2, 5, 12, 28, 65, 151, 351, 816, 1897, 4410, 10252, 23833, 55405, 128801, 299426, 696081, 1618192, 3761840, 8745217, 20330163, 47261895, 109870576, 255418101, 593775046, 1380359512, 3208946545, 7459895657, 17342153393, 40315615410, 93722435101
OFFSET
0,2
LINKS
Miklos Bona, Rebecca Smith, Pattern avoidance in permutations and their squares, arXiv:1901.00026 [math.CO], 2018. See H(z), Ex. 4.1.
FORMULA
G.f.: (1 - x + x^2) / (1 - 3*x + 2*x^2 - x^3).
G.f.: 1 / (1 - 2*x / (1 - x / (2 + x / (1 - 2*x / (1 + x))))).
a(n) = A034943(n + 2) = A185963(-2 - n).
a(n) = 3*a(n-1) + 2*a(n-2) - a(n-3).
a(n) satisfies 1 = f(a(n-2), a(n-1), a(n)) where f(u, v, w) = u^3 - 5*v^3 + w^3 + u*v * (7*v -4*u) + u*w * (3*u + 2*w) + v*w * (11*v - 6*w) - 9*u*v*w.
a(n) = A000931(3*n + 6). - Michael Somos, Sep 18 2012
EXAMPLE
G.f. = 1 + 2*x + 5*x^2 + 12*x^3 + 28*x^4 + 65*x^5 + 151*x^6 + 351*x^7 + 816*x^8 + ...
MATHEMATICA
CoefficientList[Series[(1-x+x^2)/(1-3*x+2*x^2-x^3), {x, 0, 50}], x] (* G. C. Greubel, Aug 12 2018 *)
PROG
(PARI) {a(n) = if( n<0, n = -1-n; polcoeff( (1 - x + x^2) / (1 - 2*x + 3*x^2 - x^3) + x * O(x^n), n), polcoeff( (1 - x + x^2) / (1 - 3*x + 2*x^2 - x^3) + x * O(x^n), n))}
(PARI) x='x+O('x^50); Vec((1-x+x^2)/(1-3*x+2*x^2-x^3)) \\ G. C. Greubel, Aug 12 2018
(Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+x^2)/(1-3*x+2*x^2-x^3))); // G. C. Greubel, Aug 12 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Apr 04 2012
STATUS
approved