OFFSET
0,5
COMMENTS
Diagonal sums of number triangle A117904.
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).
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).
MATHEMATICA
LinearRecurrence[{-1, 0, 2, 2, 0, -1, -1}, {1, 1, 1, 1, 3, 1, 2}, 75] (* G. C. Greubel, Oct 10 2021 *)
PROG
(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
(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
(Sage)
def A117905_list(prec):
P.<x> = 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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved