login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A324608 Number of 1's in binary expansion of A308092(n). 2

%I #20 Apr 10 2021 16:36:34

%S 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,

%T 19,19,19,19,20,20,20,22,22,22,22,22,23,23,23,25,25,25,25,25,25,26,26,

%U 26,28,28,28,28,28,28,28,29,29,30,31,31,31,31,31,31,31,31

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

%C Conjecture: sequence is weakly increasing.

%H Robert Israel, <a href="/A324608/b324608.txt">Table of n, a(n) for n = 1..3000</a>

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

%p S:= "110":

%p b("0"):= 0: b("1"):= 1:

%p A308092[1]:= 1: A308092[2]:= 2: t:= 3:

%p for n from 3 to 300 do

%p tp:= add(b(S[i])*2^(n-i),i=1..n);

%p A308092[n]:= tp - t;

%p t:= tp;

%p S:= cat(S,convert(A308092[n],binary));

%p od:

%p seq(convert(convert(A308092[n],base,2),`+`), n=1..300); # _Robert Israel_, Jun 12 2019

%t 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}]

%t Count[#,1]&/@Table[IntegerDigits[a[l],2],{l,70}] (* _Giorgos Kalogeropoulos_, Mar 30 2021 *)

%o (Python)

%o def aupton(terms):

%o alst, bstr = [1, 1], "110"

%o for n in range(3, terms+1):

%o an = int(bstr[:n], 2) - int(bstr[:n-1], 2)

%o binan = bin(an)[2:]

%o alst, bstr = alst + [binan.count('1')], bstr + binan

%o return alst

%o print(aupton(68)) # _Michael S. Branicky_, Mar 30 2021

%Y Cf. A000120, A308092.

%K nonn,base

%O 1,3

%A _Peter Kagey_, Jun 10 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)