login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A067894
Write 0, 1, ..., n in binary and add as if they were decimal numbers.
7
0, 1, 11, 22, 122, 223, 333, 444, 1444, 2445, 3455, 4466, 5566, 6667, 7777, 8888, 18888, 28889, 38899, 48910, 59010, 69111, 79221, 89332, 100332, 111333, 122343, 133354, 144454, 155555, 166665, 177776, 277776, 377777, 477787, 577798, 677898, 777999, 878109
OFFSET
0,3
COMMENTS
a(n) == floor((n+1)/2) (mod 10). - Robert G. Wilson v, May 15 2003
LINKS
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
Cf. A067895.
Partial sums of A007088.
Sequence in context: A213972 A061852 A083511 * A094620 A077431 A118133
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, based on a suggestion of Anne Donovan (anned3005(AT)aol.com) May 15 2003
EXTENSIONS
More terms from Robert G. Wilson v, Ray Chandler and James A. Sellers, May 15 2003
STATUS
approved