login
A030303
Position of n-th 1 in A030302.
11
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, 42, 43, 44, 46, 47, 48, 49, 50, 55, 59, 60, 63, 65, 68, 69, 70, 72, 75, 77, 79, 80, 82, 83, 85, 87, 88, 89, 90, 91, 95, 96, 99, 100, 101, 103, 105, 106, 108, 109, 110, 111, 112, 115, 116, 117, 119, 120
OFFSET
1,2
COMMENTS
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
LINKS
FORMULA
A030190(a(n)) = 1. - Reinhard Zumkeller, Dec 11 2011
a(n) = Sum_{k=1..n} A066099(k). - M. F. Hasler, Oct 12 2020
MATHEMATICA
Flatten[Position[Flatten[IntegerDigits[Range[30], 2]], 1]] (* Harvey P. Dale, Jan 04 2015 *)
PROG
(Haskell)
import Data.List (elemIndices)
a030303 n = a030303_list !! n
a030303_list = elemIndices 1 a030190_list
-- Reinhard Zumkeller, Dec 11 2011
(PARI) select(t->t, concat([binary(n)|n<-[1..30]]), 1) \\ M. F. Hasler, Oct 10 2020
(Python)
from itertools import count, islice
def A030303_gen(): # generator of terms
return (i + 1 for i, s in enumerate(d for n in count(1) for d in bin(n)[2:]) if s == '1')
A030303_list = list(islice(A030303_gen(), 30)) # Chai Wah Wu, Feb 18 2022
CROSSREFS
KEYWORD
nonn
EXTENSIONS
More terms from M. F. Hasler, Oct 12 2020
STATUS
approved