login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A117900
Expansion of (1 + 2*x + 4*x^2 + 4*x^3 + 2*x^4)/((1+x)*(1-x^3)^2).
2
1, 1, 3, 3, 3, 5, 6, 4, 8, 8, 6, 10, 11, 7, 13, 13, 9, 15, 16, 10, 18, 18, 12, 20, 21, 13, 23, 23, 15, 25, 26, 16, 28, 28, 18, 30, 31, 19, 33, 33, 21, 35, 36, 22, 38, 38, 24, 40, 41, 25, 43, 43, 27, 45, 46, 28, 48, 48, 30, 50, 51, 31, 53, 53, 33, 55, 56, 34, 58, 58, 36
OFFSET
0,3
COMMENTS
Diagonal sums of A117898.
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)} 2^abs(L(C(n-k,2)/3) - L(C(k,2)/3)), L(j/p) the Legendre symbol of j and p.
MATHEMATICA
CoefficientList[Series[(1+2x+4x^2+4x^3+2x^4)/((1-x^3)(1+x-x^3-x^4)), {x, 0, 80}], x] (* or *) LinearRecurrence[{-1, 0, 2, 2, 0, -1, -1}, {1, 1, 3, 3, 3, 5, 6}, 80] (* Harvey P. Dale, Mar 06 2018 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1+2*x+4*x^2+4*x^3+2*x^4)/((1+x)*(1-x^3)^2) )); // G. C. Greubel, Oct 01 2021
(Sage)
def A117899_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1+2*x+4*x^2+4*x^3+2*x^4)/((1+x)*(1-x^3)^2) ).list()
A117899_list(80) # G. C. Greubel, Oct 01 2021
CROSSREFS
Cf. A117898.
Sequence in context: A226592 A133683 A182998 * A318203 A282243 A214748
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved