OFFSET
0,4
COMMENTS
Essentially diagonal sums of Pascal's triangle modulo 3.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = Sum_{k=0..floor((n-1)/2)} mod(binomial(n-k-1, k), 3).
MATHEMATICA
Table[Sum[Mod[Binomial[n - k - 1, k], 3], {k, 0, Floor[(n - 1)/2]}], {n, 0, 100}] (* G. C. Greubel, Jan 17 2018 *)
PROG
(PARI) for(n=0, 100, print1(sum(k=0, floor((n-1)/2), lift(Mod(binomial(n-k-1, k), 3))), ", ")) \\ G. C. Greubel, Jan 17 2018
(Magma) [0] cat [(&+[Binomial(n-k-1, k) mod 3: k in [0..Floor((n-1)/2)]]): n in [1..100]]; // G. C. Greubel, Jan 17 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 13 2004
STATUS
approved