%I #22 Apr 03 2023 18:31:18
%S 1,-1,2,-3,3,-4,5,-5,6,-7,7,-8,9,-9,10,-11,11,-12,13,-13,14,-15,15,
%T -16,17,-17,18,-19,19,-20,21,-21,22,-23,23,-24,25,-25,26,-27,27,-28,
%U 29,-29,30,-31,31,-32,33,-33,34,-35,35,-36,37,-37,38,-39,39,-40,41,-41,42,-43
%N Hankel transform of a Motzkin variant.
%C Hankel transform of A168051.
%H G. C. Greubel, <a href="/A168052/b168052.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-1,0,-1,-1).
%F G.f.: (1+x^2)/((1+x)^2*(1-x+x^2)).
%F a(n) = cos(Pi*n/3)/3 + sqrt(3)*sin(Pi*n/3)/9 + 2*(n+1)*(-1)^n/3.
%F a(n) = A010892(n)/3 + 2*(-1)^n*(n+1)/3. - _R. J. Mathar_, Sep 30 2012
%F E.g.f.: exp(-x)*(6 - 6*x + exp(3*x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/9. - _Stefano Spezia_, Apr 03 2023
%t LinearRecurrence[{-1, 0, -1, -1}, {1, -1, 2, -3}, 100] (* _G. C. Greubel_, Jul 07 2016 *)
%t CoefficientList[Series[(1 + x^2) / ((1 + x)^2 (1 - x + x^2)), {x, 0, 80}], x] (* _Vincenzo Librandi_, Jul 08 2016 *)
%o (Magma) I:=[1,-1,2,-3]; [n le 4 select I[n] else - Self(n-1)-Self(n-3)- Self(n-4): n in [1..65]]; // _Vincenzo Librandi_, Jul 08 2016
%Y Cf. A010892, A168051.
%K easy,sign
%O 0,3
%A _Paul Barry_, Nov 17 2009