login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A329735
a(n) is the least k > 0 such that the binary representation of n appears as a substring in the binary representation of at least half of the numbers in the range 1..k.
1
1, 2, 14, 38, 110, 62, 1006, 2206, 5072, 21504, 7114, 3704, 13868, 4058, 4067254, 4384886, 9535340, 39157714, 20466206, 5565048, 732167206, 47755164, 24722194, 12837030, 27081364, 14017192, 231845728, 15111866, 32273342, 16292028, 17478178355102
OFFSET
1,2
COMMENTS
The sequence is well defined as for any n > 0, the proportion of numbers in the range 1..k whose binary representation contains that of n tends to 1 as k tends to infinity.
For any n > 0, the binary representation of n appears as a substring in the binary representation of a(n).
Apparently, records occur at indices n such that the representation of n in base 2^w contains only the digit 2^k for some w and k such that 0 <= k < w (see A330220).
LINKS
EXAMPLE
For n = 3:
- the binary representation of 3 is "11",
- the binary representation of the first numbers, alongside the proportion p of those containing "11", is:
k bin(k) p
-- ------ ----
1 1 0
2 10 0
3 11 1/3
4 100 1/4
5 101 1/5
6 110 1/3
7 111 3/7
8 1000 3/8
9 1001 1/3
10 1010 3/10
11 1011 4/11
12 1100 5/12
13 1101 6/13
14 1110 1/2
- we first reach a proportion p >= 1/2 for k = 14,
- hence a(3) = 14.
PROG
(PARI) See Links section.
CROSSREFS
Cf. A330220.
Sequence in context: A092344 A281711 A216528 * A290124 A192349 A230801
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 20 2019
STATUS
approved