OFFSET
0,5
COMMENTS
For a guide to related sequences, see A211422.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,-1,-1,1).
FORMULA
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).
a(n) - a(n-1) = A178804(n-2). - Reinhard Zumkeller, Nov 15 2014
a(n) = (6*n^2-10*n+3+(2*n-7)*(-1)^n-4*(-1)^((2*n-3-(-1)^n)/4))/32. - Luce ETIENNE, Dec 31 2015
a(n) = Sum_{k=1..floor(n/2)} floor((n-k)/2). - Wesley Ivan Hurt, Apr 01 2017
G.f.: x^3 * (1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ). - Joerg Arndt, Apr 02 2017
a(n)+a(n-1) = A282513(n-2). - R. J. Mathar, Jun 23 2021
a(n) = floor((n-1)^2/4) - floor((n-1)/4)*floor((n+1)/4). - Ridouane Oudra, Nov 21 2024
MAPLE
seq(floor((n-1)^2/4)-floor((n-1)/4)*floor((n+1)/4), n=0..60); # Ridouane Oudra, Nov 21 2024
MATHEMATICA
t[n_] := t[n] = Flatten[Table[w - 2 x + 4 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
c[n_] := Count[t[n], 0]
t = Table[c[n], {n, 0, 70}] (* this sequence *)
FindLinearRecurrence[t]
LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {0, 0, 0, 1, 2, 3, 5}, 57] (* Ray Chandler, Aug 02 2015 *)
PROG
(Haskell)
a211520 n = a211520_list !! n
a211520_list = 0 : 0 : 0 : scanl1 (+) a178804_list
-- Reinhard Zumkeller, Nov 15 2014
(PARI) { my(x='x+O('x^66)); concat([0, 0, 0], Vec( x^3*(1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ) ) ) } \\ Joerg Arndt, Apr 02 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 14 2012
STATUS
approved