OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
G. Nebe, E. M. Rains and N. J. A. Sloane, Self-Dual Codes and Invariant Theory, Springer, Berlin, 2006.
Index entries for linear recurrences with constant coefficients, signature (2,-1,2,-4,2,-1,2,-1).
FORMULA
G.f.: (1+x^3)/((1-x)^2*(1-x^3)^2) = (1+x^3)/((1-x)^4*(1+x+x^2)^2).
a(n) = Sum(i=1..n+3, floor(i/3)^2). - Enrique Pérez Herrero, Mar 20 2012
a(n) = (1/2)*(-4*t^3 + (2n-7)*t^2 + (4n-1)*t +2n +2), where t = floor(n/3). - Ridouane Oudra, Oct 19 2019
MAPLE
seq(add(floor(i/3)^2, i=1..n+3), n=0..60); # Ridouane Oudra, Oct 19 2019
MATHEMATICA
a[n_] := Sum[Floor[i/3]^2, {i, 1, n+3}]; Table[a[n], {n, 0, 100}] (* Enrique Pérez Herrero, Mar 20 2012 *)
PROG
(Sage)
def A092353():
a, b, c, m = 0, 0, 0, 0
while True:
yield (a*(a*(2*a+9)+13)+b*(b+1)*(2*b+1)+c*(c+1)*(2*c+1)+6)//6
m = m + 1 if m < 2 else 0
if m == 0: a += 1
elif m == 1: b += 1
elif m == 2: c += 1
a = A092353()
print([next(a) for _ in range(52)]) # Peter Luschny, May 04 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 20 2004
STATUS
approved