login
INVERT transform of A028310.
1

%I #17 Sep 08 2022 08:45:54

%S 1,2,5,12,28,65,151,351,816,1897,4410,10252,23833,55405,128801,299426,

%T 696081,1618192,3761840,8745217,20330163,47261895,109870576,255418101,

%U 593775046,1380359512,3208946545,7459895657,17342153393,40315615410,93722435101

%N INVERT transform of A028310.

%H G. C. Greubel, <a href="/A181984/b181984.txt">Table of n, a(n) for n = 0..1000</a>

%H Miklos Bona, Rebecca Smith, <a href="https://arxiv.org/abs/1901.00026">Pattern avoidance in permutations and their squares</a>, arXiv:1901.00026 [math.CO], 2018. See H(z), Ex. 4.1.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3, -2, 1).

%F G.f.: (1 - x + x^2) / (1 - 3*x + 2*x^2 - x^3).

%F G.f.: 1 / (1 - 2*x / (1 - x / (2 + x / (1 - 2*x / (1 + x))))).

%F a(n) = A034943(n + 2) = A185963(-2 - n).

%F a(n) = 3*a(n-1) + 2*a(n-2) - a(n-3).

%F 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.

%F a(n) = A000931(3*n + 6). - _Michael Somos_, Sep 18 2012

%e 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 + ...

%t CoefficientList[Series[(1-x+x^2)/(1-3*x+2*x^2-x^3), {x, 0, 50}], x] (* _G. C. Greubel_, Aug 12 2018 *)

%o (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))}

%o (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

%o (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

%Y Cf. A000931, A028310, A034943, A185963.

%K nonn

%O 0,2

%A _Michael Somos_, Apr 04 2012