A117905 Expansion of (1+2*x+2*x^2)/((1+x)*(1-x^3)^2).
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, 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, 11, 31, 11, 11, 33, 11, 12, 34, 12, 12, 36
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-1,0,2,2,0,-1,-1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 75); Coefficients(R!( (1+2*x+2*x^2)/((1+x)*(1-x^3)^2) )); // G. C. Greubel, Oct 18 2021 -
Mathematica
LinearRecurrence[{-1,0,2,2,0,-1,-1}, {1,1,1,1,3,1,2}, 75] (* G. C. Greubel, Oct 10 2021 *)
-
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
-
Sage
def A117905_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( (1+2*x+2*x^2)/((1+x)*(1-x^3)^2) ).list() A117905_list(75) # G. C. Greubel, Oct 18 2021
Formula
a(n) = -a(n-1) + 2*a(n-3) + 2*a(n-4) - a(n-6) - a(n-7).
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.
From G. C. Greubel, Oct 18 2021: (Start)
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).
Comments