OFFSET
0,5
COMMENTS
Diagonal sums of A117908.
Appears to be a permutation of floor((n+5)/5).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,1,0,0,1,0,0,-1).
FORMULA
a(n) = a(n-3) + a(n-6) - a(n-9).
a(n) = Sum_{k=0..floor(n/2)} 0^abs(L(C(n-k,2)/3) - 2*L(C(k,2)/3)) where L(j/p) is the Legendre symbol of j and p.
From G. C. Greubel, Nov 18 2021: (Start)
MATHEMATICA
CoefficientList[Series[(1+x+x^2+x^4)/((1-x^3)(1-x^6)), {x, 0, 100}], x] (* or *) LinearRecurrence[{0, 0, 1, 0, 0, 1, 0, 0, -1}, {1, 1, 1, 1, 2, 1, 2, 3, 2}, 100] (* Harvey P. Dale, Apr 10 2014 *)
Table[If[Mod[n, 3]==1, Mod[Binomial[n+2, 3], n+2], Floor[(n+6)/6]], {n, 0, 100}] (* G. C. Greubel, Nov 18 2021 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 100); Coefficients(R!( (1+x+x^2+x^4)/((1-x^3)*(1-x^6)) )); // G. C. Greubel, Oct 21 2021
(Sage)
def A117910_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1+x+x^2+x^4)/((1-x^3)*(1-x^6)) ).list()
A117910_list(100) # G. C. Greubel, Oct 21 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved