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.

User: Oliver K. Seet

Oliver K. Seet's wiki page.

Oliver K. Seet has authored 1 sequences.

A157845 a(0) = 1, a(n) = sum of binary digits of all prior terms, expressed in binary.

Original entry on oeis.org

1, 1, 10, 11, 101, 111, 1010, 1100, 1110, 10001, 10011, 10110, 11001, 11100, 11111, 100100, 100110, 101001, 101100, 101111, 110100, 110111, 111100, 1000000, 1000001, 1000011, 1000110, 1001001, 1001100, 1001111, 1010100, 1010111, 1011100, 1100000, 1100010
Offset: 0

Author

Oliver K. Seet, Mar 07 2009

Keywords

Comments

Equals A230297 = A010062 converted from decimal to binary, prefixed by another initial 1. - M. F. Hasler, Nov 18 2019

Crossrefs

Cf. A004207 (base-10 analog); A007088 (n in binary), A010062 (this written in base 10), A000120 (Hammingweight), A092391 (A000120(n) + n), A028897 (convert binary to decimal).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1, b(n-1)+
          add(i, i=convert(a(n-1), base, 10)))
        end:
    a:= n-> convert(b(n), binary):
    seq(a(n), n=0..44);  # Alois P. Heinz, Nov 18 2019
  • Mathematica
    s[0] = s[1] = 1; s[n_] := s[n] = s[n-1] + DigitCount[s[n-1], 2, 1]; Table[FromDigits[IntegerDigits[s[n], 2]], {n, 0, 50}] (* Amiram Eldar, Jul 28 2023 *)
  • PARI
    lista(nn) = {my(s = 1); my(t = 1); print1(t, ", "); for (i=1, nn, sb = binary(s); t = subst(Pol(sb), x, 10); print1(t, ", "); s += hammingweight(sb););}
    
  • PARI
    apply( A157845(n)=fromdigits(binary(A010062(n-!!n))), [0..40]) \\ M. F. Hasler, Nov 18 2019

Formula

a(n) = A230297(n-1) = A007088(A010062(n-1)) = A007088(A092391(A028897(a(n-1)))) for n > 0. - M. F. Hasler, Nov 18 2019

Extensions

a(11) corrected and extended by R. J. Mathar, Mar 12 2009
More terms from Michel Marcus, Apr 19 2014