%I #34 Jun 30 2024 22:09:30
%S 1,2,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,
%T 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,
%U 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
%N a(0)=1, for n > 0: n-th run consists of 2^n-1 copies of n+1.
%C a(A214489(n)) = A070939(A214489(n)).
%H Reinhard Zumkeller, <a href="/A103586/b103586.txt">Table of n, a(n) for n = 0..10000</a>
%H David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>].
%H David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Sloane/sloane300.html">Sloping binary numbers: a new sequence related to the binary numbers</a>, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.
%H O. Kullmann and X. Zhao, <a href="http://arxiv.org/abs/1408.0629">Bounds for variables with few occurrences in conjunctive normal forms</a>, arXiv preprint arXiv:1408.0629 [math.CO], 2014-2017.
%H Ana Luzón, Manuel A. Morón, and Luis Felipe Prieto-Martínez, <a href="https://www.researchgate.net/publication/353388683_Commutators_and_commutator_subgroups_of_the_Riordan_group">Commutators and commutator subgroups of the Riordan group</a>, (2021).
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F a(n) = A070939(n + A070939(n)) for n > 0. - _Reinhard Zumkeller_, Jul 21 2012
%t Join[{1},Flatten[Table[PadRight[{},2^n-1,n+1],{n,6}]]] (* _Harvey P. Dale_, Aug 22 2021 *)
%o (Haskell)
%o a103586 n = a070939 (n + a070939 n)
%o a103586_list = 1 : concat
%o (zipWith (replicate . fromInteger) (tail a000225_list) [2..])
%o -- _Reinhard Zumkeller_, Jul 21 2012
%o (Python)
%o def A103586(n): return (m:=n.bit_length())+(n>=(1<<m)-m) if n else 1 # _Chai Wah Wu_, Jun 30 2024
%Y Number of bits in binary representation of A102370(n).
%Y Cf. A000225.
%K nonn,base,easy
%O 0,2
%A _Benoit Cloitre_, Mar 24 2005
%E a(0) = 1 added, definition and offset adjusted by _Reinhard Zumkeller_, Jul 21 2012