login
Position of n-th 1 in A030302.
11

%I #49 Feb 18 2022 10:56:39

%S 1,2,4,5,6,9,11,12,13,15,16,17,18,22,25,26,28,30,32,33,34,35,38,39,41,

%T 42,43,44,46,47,48,49,50,55,59,60,63,65,68,69,70,72,75,77,79,80,82,83,

%U 85,87,88,89,90,91,95,96,99,100,101,103,105,106,108,109,110,111,112,115,116,117,119,120

%N Position of n-th 1 in A030302.

%C Partial sums of A066099; also positions of 1's in the Champernowne word A030190 which therefore is the characteristic function of this sequence seen as a set. The graph of this sequence has a self-similar shape with increasingly important "cusps" at indices given by A005183, which also indexes records in A066099. - _M. F. Hasler_, Oct 12 2020

%H Reinhard Zumkeller, <a href="/A030303/b030303.txt">Table of n, a(n) for n = 1..10000</a>

%F A030190(a(n)) = 1. - _Reinhard Zumkeller_, Dec 11 2011

%F a(n) = Sum_{k=1..n} A066099(k). - _M. F. Hasler_, Oct 12 2020

%t Flatten[Position[Flatten[IntegerDigits[Range[30],2]],1]] (* _Harvey P. Dale_, Jan 04 2015 *)

%o (Haskell)

%o import Data.List (elemIndices)

%o a030303 n = a030303_list !! n

%o a030303_list = elemIndices 1 a030190_list

%o -- _Reinhard Zumkeller_, Dec 11 2011

%o (PARI) select(t->t,concat([binary(n)|n<-[1..30]]),1) \\ _M. F. Hasler_, Oct 10 2020

%o (Python)

%o from itertools import count, islice

%o def A030303_gen(): # generator of terms

%o return (i + 1 for i, s in enumerate(d for n in count(1) for d in bin(n)[2:]) if s == '1')

%o A030303_list = list(islice(A030303_gen(),30)) # _Chai Wah Wu_, Feb 18 2022

%Y Cf. A030190, A030302, A003607, A066099.

%K nonn

%O 1,2

%A _Clark Kimberling_

%E More terms from _M. F. Hasler_, Oct 12 2020