cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A067894 Write 0, 1, ..., n in binary and add as if they were decimal numbers.

This page as a plain text file.
%I A067894 #30 Jul 02 2025 16:02:01
%S A067894 0,1,11,22,122,223,333,444,1444,2445,3455,4466,5566,6667,7777,8888,
%T A067894 18888,28889,38899,48910,59010,69111,79221,89332,100332,111333,122343,
%U A067894 133354,144454,155555,166665,177776,277776,377777,477787,577798,677898,777999,878109
%N A067894 Write 0, 1, ..., n in binary and add as if they were decimal numbers.
%C A067894 a(n) == floor((n+1)/2) (mod 10). - _Robert G. Wilson v_, May 15 2003
%H A067894 Harvey P. Dale, <a href="/A067894/b067894.txt">Table of n, a(n) for n = 0..1000</a>
%H A067894 Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, pp. 43-44.
%e A067894 a(6) = 0 + 1 + 10 + 11 + 100 + 101 + 110 = 333.
%p A067894 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:
%t A067894 f[n_] := Apply[Plus, Table[ FromDigits[ IntegerDigits[i, 2]], {i, 0, n}]]; Table[ f[n], {n, 0, 36}]
%t A067894 Accumulate[Table[FromDigits[IntegerDigits[n,2]],{n,0,40}]] (* _Harvey P. Dale_, Dec 30 2015 *)
%Y A067894 Cf. A067895.
%Y A067894 Partial sums of A007088.
%K A067894 nonn,base,easy
%O A067894 0,3
%A A067894 _N. J. A. Sloane_, based on a suggestion of Anne Donovan (anned3005(AT)aol.com) May 15 2003
%E A067894 More terms from _Robert G. Wilson v_, _Ray Chandler_ and _James Sellers_, May 15 2003