%I #12 Sep 08 2022 08:45:24
%S 1,1,1,1,3,1,2,4,2,2,6,2,3,7,3,3,9,3,4,10,4,4,12,4,5,13,5,5,15,5,6,16,
%T 6,6,18,6,7,19,7,7,21,7,8,22,8,8,24,8,9,25,9,9,27,9,10,28,10,10,30,10,
%U 11,31,11,11,33,11,12,34,12,12,36
%N Expansion of (1+2*x+2*x^2)/((1+x)*(1-x^3)^2).
%C Diagonal sums of number triangle A117904.
%H G. C. Greubel, <a href="/A117905/b117905.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (-1,0,2,2,0,-1,-1).
%F a(n) = -a(n-1) + 2*a(n-3) + 2*a(n-4) - a(n-6) - a(n-7).
%F a(n) = Sum_{k=0..floor(n/2)} 0^abs(L(C(n-k,2)/3) - L(C(k,2)/3)), where L(j/p) is the Legendre symbol of j and p.
%F From _G. C. Greubel_, Oct 18 2021: (Start)
%F a(n) = (1/36)*(10*n + 23 + (-1)^n*(9 + 16*u(n, 1/2) - 4*u(n-1, 1/2) - 12*Sum_{j=0..n} u(n-j, 1/2)*u(j, 1/2))), where u(n, x) = ChebyshevU(n, x).
%F a(n) = (1/36)*(39 + 30*n + 9*(-1)^n - 48*floor((n+2)/3) - 12*floor((n+1)/3) - 12*b(n)), where b(n) = binomial(n+3, 3) - 6*A014125(n-1) + 9*A144677(n-2). (End)
%t LinearRecurrence[{-1,0,2,2,0,-1,-1}, {1,1,1,1,3,1,2}, 75] (* _G. C. Greubel_, Oct 10 2021 *)
%o (PARI) lista(n) = {my(x = 'x + 'x*O('x^n)); P = (1+2*x+2*x^2) / ((1-x^3)*(1+x-x^3-x^4)); Vec(P);} \\ _Michel Marcus_, Mar 20 2013
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 75); Coefficients(R!( (1+2*x+2*x^2)/((1+x)*(1-x^3)^2) )); // _G. C. Greubel_, Oct 18 2021
%o (Sage)
%o def A117905_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P( (1+2*x+2*x^2)/((1+x)*(1-x^3)^2) ).list()
%o A117905_list(75) # _G. C. Greubel_, Oct 18 2021
%Y Cf. A014125, A117904, A144677.
%K easy,nonn
%O 0,5
%A _Paul Barry_, Apr 01 2006