login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056744 a(n) is the smallest number which when written in binary contains as substrings the binary expansions of 1..n. 10

%I #76 Jun 21 2021 23:35:05

%S 1,2,6,12,44,44,92,184,1208,1256,4792,4792,9912,9912,19832,39664,

%T 563952,576464,4496112,4499184,17996528,17997488,143972080,143972080,

%U 145057520,145070832,294967024,294967024,589944560,589944560,1179889136,2359778272,71079255008

%N a(n) is the smallest number which when written in binary contains as substrings the binary expansions of 1..n.

%C From _Davis Smith_, May 09 2021: (Start)

%C For n > 2, a(n) cannot be a power of 2.

%C If A007088(n) (the binary expansion of n) contains a string of k zeros, then it contains A007088(2^m), where 0 <= m <= k, as a substring. Similarly, if A007088(n) contains a string of k ones, then it contains A007088(2^m - 1), where 1 <= m <= k. Strings of zeros and ones are the most compact way to have powers of 2 and powers of 2 minus 1 (respectively) as substrings in a binary expansion. This means that A007088(a(n)) will contain a string of A000523(n) ones and a string of A000523(n) zeros. The binary expansion of a(2^k - 1) will contain a string of k ones and a string of k - 1 zeros.

%C Conjecture: a(n) == 0 (mod A053644(n)), i.e., A007088(a(n)) ends with the longest string of zeros. It follows from this that a(2^k) = 2*a(2^k - 1). A conjecture related to this is that a(2^k - 1) = 2*a(2^k - 2) + 2^(k - 1), i.e., A007088(a(2^k - 1)) ends with the longest string of ones followed by the longest string of zeros. Ending with the longest string of ones followed by the longest string of zeros is not true for all A007088(a(n)), as some have a hiccup before starting their string of zeros, e.g., a(10), a(18), a(22), and a(34).

%C Conjecture: a(2^k + 1) = 2^(k + floor(log_2(a(2^k)))) + a(2^k), i.e., concatenate the binary expansion of 2^(k - 1) to the front of the binary expansion of a(2^k) in order to get the binary expansion of a(2^k + 1).

%C (End)

%C All terms belong to A261467. - _Rémy Sigrist_, May 11 2021

%C From _Jon E. Schoenfield_, Jun 03 2021: (Start)

%C Conjecture: the binary expansion of a(n) contains exactly ceiling(n/2) 1's iff 2^m - 7 <= n <= 2^m + 6 for some integer m >= 3. (See Links.)

%C Conjecture: for n > 1, the binary expansion of a(n) begins with that of 2^floor(log_2(n-1)) + 1.(End)

%C From _Davis Smith_, Jun 05 2021: (Start)

%C For a proof that a(n) == 2^floor(log_2(n)) (mod 2^(floor(log_2(n)) + 1)), see my second link (not the b-file). This also proves the conjecture from May 09 2021 which states that it is congruent to 0 (mod A053644(n)). A proof for the related conjecture would likely rely on an explanation of values of n such that a(n) is not congruent to (2^floor(log_2(n)) - 1)*2^floor(log_2(n)) (mod 2^(2*floor(log_2(n)))), i.e. the values of n such that A007088(a(n)) does not end with a string of floor(log_2(n)) ones followed immediately by a string of floor(log_2(n)) zeros. A proof for Jon E. Schoenfield's second conjecture on Jun 03 2021 would satisfy my more restricted second conjecture and it may follow necessarily from my proof, assuming that A007088(a(n)) must begin with either A007088(2^floor(log_2(n - 1)) + 1) or A007088(2^floor(log_2(n))). (End)

%H Davis Smith, <a href="/A056744/b056744.txt">Table of n, a(n) for n = 1..64</a>

%H David A. Corneth, <a href="/A056744/a056744.txt">substrings of a(33) and a(36) listed</a>.

%H Jon E. Schoenfield, <a href="/A056744/a056744_10.txt">Conjecture on the number of 1's in the binary expansion of a(n)</a>.

%H Jon E. Schoenfield, <a href="/A056744/a056744_7.txt">Lower bounds on the numbers of 1-bits and 0-bits in a(n), a tabular method for deducing the order in which substrings occur in the binary expansion of a(n), and an approach for accounting for duplicate substrings when a(n) has more than ceiling(n/2) 1-bits, illustrated with a proof of the exact value of a(49)</a>.

%H Jon E. Schoenfield, <a href="/A056744/a056744_9.txt">Values for n = 1..64 in binary and decimal</a>.

%H Davis Smith, <a href="/A056744/a056744_8.txt">Proof that A056744(n) == 2^floor(log_2(n)) (mod 2^(floor(log_2(n))+1))</a>.

%F A144016(a(n)) >= n. - _Rémy Sigrist_, May 11 2021

%e a(6)=44 because 101100 (44 in base 2) is the smallest number that contains 1, 10, 11, 100, 101 and 110 (1 through 6 in base 2).

%e Terms begin as follows (see Links for a longer table):

%e .

%e a(n)

%e =========================

%e n decimal binary

%e -- ------- ----------------

%e 1 1 1

%e 2 2 10

%e 3 6 110

%e 4 12 1100

%e 5 44 101100

%e 6 44 101100

%e 7 92 1011100

%e 8 184 10111000

%e 9 1208 10010111000

%e 10 1256 10011101000

%e 11 4792 1001010111000

%e 12 4792 1001010111000

%e 13 9912 10011010111000

%e 14 9912 10011010111000

%e 15 19832 100110101111000

%e 16 39664 1001101011110000

%o (PARI)

%o A056744_vec(n)={

%o my(

%o L=List([1]),x=L[#L],Z=n+#L,B=binary(x),

%o A=setbinop((y,z)->fromdigits(B[y..z],2),[1..#B])

%o );

%o while(#L<Z,while((#A<(#L+2))||(A[#L+2]!=#L+1),

%o B=binary(x++);A=setbinop((y,z)->fromdigits(B[y..z],2),[1..#B]));listput(L,x));Vec(L)

%o } \\ _Davis Smith_, May 09 2021

%Y Cf. A000523, A035239, A007088, A053644, A053645, A078822, A119709 (binary substrings), A144016, A261467.

%K base,nonn

%O 1,2

%A Fred J. Schalekamp, Aug 15 2000

%E More terms from _Naohiro Nomoto_, Jul 20 2001

%E a(25)-a(31) from _Ray Chandler_, Nov 06 2008

%E a(32) from _Davis Smith_, May 10 2021

%E a(33) from _Jon E. Schoenfield_, May 11 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 13:04 EDT 2024. Contains 371913 sequences. (Running on oeis4.)