OFFSET
0,4
MATHEMATICA
f[0] = 1; f[1] = 1; f[2] = 1;
f[n_] := f[n] = If[Mod[Floor[Sum[f[i], {i, 0, n - 1}]/2], 2^(4 + Mod[n, 3])] == 0, 1 + Mod[n, 3], f[n - f[n - 1]] + f[n - f[n - 2]]];
a = Table[f[n], {n, 0, 200}]
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Roger L. Bagula, Oct 15 2009
STATUS
approved