OFFSET
0,8
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..65536
FORMULA
a(4*n) = a(n),
a(4*n+1) = a(n+1) - a(n),
a(4*n+2) = a(n+2) - 2*a(n+1) + a(n),
a(4*n+3) = a(n+3) - 3*a(n+2) + 3*a(n+1) - a(n).
MAPLE
a:= proc(n) option remember; (m-> `if`(n<4, `if`(n=3, 1, 0), add(
a(q+m-j)*(-1)^j*binomial(m, j), j=0..m)))(irem(n, 4, 'q'))
end:
seq(a(n), n=0..100);
MATHEMATICA
a[n_] := a[n] = Module[{ m, q}, {q, m} = QuotientRemainder[n, 4]; If[n < 4, If[n == 3, 1, 0], Sum[a[q + m - j]*(-1)^j*Binomial[m, j], {j, 0, m}]]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 09 2018, from Maple *)
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Sep 27 2013
STATUS
approved