login
A189638
Partial sums of A116178.
6
0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 11, 11, 12, 13, 13, 13, 14, 14, 14, 15, 15, 16, 17, 17, 17, 18, 18, 18, 19, 19, 20, 21, 21, 21, 22, 22, 23, 24, 24, 25, 26, 26, 26, 27, 27, 27, 28, 28, 29, 30, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 35, 36, 36, 37, 38, 38, 39, 40
OFFSET
1,6
COMMENTS
See A116178.
FORMULA
s(n)=s([(n+1)/3])+[n/3], where s(0)=0.
MATHEMATICA
t = Nest[Flatten[# /. {0->{0, 0, 1}, 1->{0, 1, 1}}] &, {0}, 5] (*A116178*)
f[n_] := t[[n]]
Flatten[Position[t, 0]] (*A189636*)
Flatten[Position[t, 1]] (*A189637*)
s[n_] := Sum[f[i], {i, 1, n}]; s[0] = 0;
Table[s[n], {n, 1, 120}] (*A189638*)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 24 2011
STATUS
approved