OFFSET
1,6
FORMULA
a(n)=Sum[1 - Mod[n - Floor[n/2^m], 2] + Mod[n - Floor[n/2^m], 2]Mod[n - Floor[n/2^(m - 1)], 2],{m, 1, Floor[(n)*Log[2]]}]
MATHEMATICA
Clear[s, k, n] k[n_] := Apply[ Plus, Table[1 - Mod[n - Floor[n/2^m], 2] +Mod[n - Floor[n/2^m], 2]Mod[n - Floor[n/2^(m - 1)], 2], {m, 1, Floor[(n)*Log[2]]}]]; a = Table[k[n], {n, 1, 50}]
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Roger L. Bagula, Mar 24 2008
STATUS
approved