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.

A324608 Number of 1's in binary expansion of A308092(n).

Original entry on oeis.org

1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 10, 11, 11, 11, 13, 13, 14, 14, 14, 16, 16, 16, 17, 17, 17, 19, 19, 19, 19, 20, 20, 20, 22, 22, 22, 22, 22, 23, 23, 23, 25, 25, 25, 25, 25, 25, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 29, 29, 30, 31, 31, 31, 31, 31, 31, 31, 31
Offset: 1

Views

Author

Peter Kagey, Jun 10 2019

Keywords

Comments

Conjecture: sequence is weakly increasing.

Crossrefs

Programs

  • Maple
    S:= "110":
    b("0"):= 0: b("1"):= 1:
    A308092[1]:= 1: A308092[2]:= 2: t:= 3:
    for n from 3 to 300 do
      tp:= add(b(S[i])*2^(n-i),i=1..n);
      A308092[n]:= tp - t;
      t:= tp;
      S:= cat(S,convert(A308092[n],binary));
    od:
    seq(convert(convert(A308092[n],base,2),`+`), n=1..300); # Robert Israel, Jun 12 2019
  • Mathematica
    a[1]=1;a[2]=2;a[n_]:=a[n]=FromDigits[Flatten[IntegerDigits[#,2]&/@Table[a[k],{k,n-1}]][[;;n]],2]-Total@Table[a[m],{m,n-1}]
    Count[#,1]&/@Table[IntegerDigits[a[l],2],{l,70}] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
  • Python
    def aupton(terms):
      alst, bstr = [1, 1], "110"
      for n in range(3, terms+1):
        an = int(bstr[:n], 2) - int(bstr[:n-1], 2)
        binan = bin(an)[2:]
        alst, bstr = alst + [binan.count('1')], bstr + binan
      return alst
    print(aupton(68)) # Michael S. Branicky, Mar 30 2021

Formula

a(n) = A000120(A308092(n)).