OFFSET
0,3
COMMENTS
a(n) == floor((n+1)/2) (mod 10). - Robert G. Wilson v, May 15 2003
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 43-44.
EXAMPLE
a(6) = 0 + 1 + 10 + 11 + 100 + 101 + 110 = 333.
MAPLE
for n from 0 to 50 do s := 0: for j from 0 to n do s := s+convert(j, binary): od: printf(`%d, `, s): od:
MATHEMATICA
f[n_] := Apply[Plus, Table[ FromDigits[ IntegerDigits[i, 2]], {i, 0, n}]]; Table[ f[n], {n, 0, 36}]
Accumulate[Table[FromDigits[IntegerDigits[n, 2]], {n, 0, 40}]] (* Harvey P. Dale, Dec 30 2015 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, based on a suggestion of Anne Donovan (anned3005(AT)aol.com) May 15 2003
EXTENSIONS
STATUS
approved