Write n in binary. Consider the 0's and 1 as a list. (*) If the new list consists entirely of 1's, then a(n) = the number of 1's, and end. Otherwise, construct a new list made up of the lengths, written in order, of the runs of similarly-valued terms from the previous list. Go to *.
A175872
Write n in binary. Consider the 0's and 1 as a list. (*) If the new list consists entirely of 1's, then a(n) = the number of 1's, and end. Otherwise, construct a new list made up of the lengths, written in order, of the runs of similarly-valued terms from the previous list. Go to *.
Terms
- a(0) =1a(1) =2a(2) =2a(3) =2a(4) =3a(5) =2a(6) =3a(7) =2a(8) =3a(9) =4a(10) =2a(11) =1a(12) =2a(13) =2a(14) =4a(15) =2a(16) =3a(17) =2a(18) =2a(19) =2a(20) =5a(21) =2a(22) =2a(23) =2a(24) =2a(25) =2a(26) =3a(27) =2a(28) =2a(29) =2
External references
- oeis: A175872