OFFSET
0,5
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,3,0,0,-3,0,0,1).
FORMULA
G.f.: (1+x+x^2-2*x^3+x^4+7*x^5+x^6-2*x^7+x^8)/(1-x^3)^3.
E.g.f.: (1+x+x^2/2)*(exp(x)+exp(w*x)+exp(w^2*x))/3, w=exp(2*Pi*I/3).
MATHEMATICA
A391264[n_] := Switch[Mod[n, 3], 0, 1, 1, n, _, n*(n-1)/2];
Array[A391264, 100, 0] (* Paolo Xausa, Jan 22 2026 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jan 09 2026
STATUS
approved
