cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A109812 a(1)=1; thereafter a(n) = smallest positive integer not among the earlier terms of the sequence such that a(n) and a(n-1) have no common 1-bits in their binary representations.

Original entry on oeis.org

1, 2, 4, 3, 8, 5, 10, 16, 6, 9, 18, 12, 17, 14, 32, 7, 24, 33, 20, 11, 36, 19, 40, 21, 34, 13, 48, 15, 64, 22, 41, 66, 25, 38, 65, 26, 37, 72, 23, 96, 27, 68, 35, 28, 67, 44, 80, 39, 88, 128, 29, 98, 129, 30, 97, 130, 45, 82, 132, 42, 69, 50, 73, 52, 74, 49, 70, 56, 71, 136, 51
Offset: 1

Views

Author

Leroy Quet, Aug 16 2005

Keywords

Comments

Theorem: Sequence is a permutation of the positive integers. - Leroy Quet, Aug 16 2005
Proof: It is clear that the sequence is infinite. The first time a number >= 2^k appears (for k>1), it must BE 2^k, and is therefore immediately followed by the smallest missing number. Since there are infinitely many powers of 2, every number will eventually appear. - N. J. A. Sloane, Jun 02 2018, rewritten Apr 03 2022
The sequence should really begin with a(0) = 0, a(1) = 1, a(2) = 2, etc., and be defined simply as "the lexicographically earliest infinite sequence of nonnegative numbers such that the binary expansions of adjacent terms are disjoint". There is also an obvious equivalent definition as a sequence of subsets of the nonnegative integers such that successive subsets are disjoint. But for historical reasons we will keep the present definition. - N. J. A. Sloane, Apr 04 2022
Inverse permutation = A113233; A113232 = a(a(n)). - Reinhard Zumkeller, Oct 19 2005
Sequence of fixed points, where a(n) = n, is A340016. - Thomas Scheuerle, Dec 24 2020
Comment from Rémy Sigrist, Apr 04 2022 [added by N. J. A. Sloane, Apr 06 2022]: (Start)
If we compare the log scatterplots of the even and odd bisections of this sequence, usually everything is scrambled, but on some large intervals the bisections appear as two parallel stripes.
On these intervals, for some constant k,
- one bisection has values of the form 2^k + something < 2^(k-1)
- the other bisection has values < 2^(k-1).
This is shown in the pair of Sigrist "The two bisections" links. (End)
Comment from N. J. A. Sloane, Apr 06 2022: (Start)
Near Gavarnie France there is a gap in the wall of the Pyrenees known as the Brèche de Roland. The graph of the present sequence shows a sequence of very similar gaps or brèches, at slightly irregular intervals.
It is hoped that if the positions of these brèches can be identified, this will provide a key to the structure of this mysterious sequence.
If the reader clicks the "graph" button here, the top graph shows an obvious brèche between n=59 and n=71. This is also shown in one of the links below.
[More information about the positions of the brèches will be added here soon.] (End)
If a(m) AND a(n) = a(m) then m <= n. - Rémy Sigrist, Apr 04 2022
It appears that a(n)/n is bounded (it is probably less than 4 for all n), and n/a(n) is unbounded. See A352336, A352359, A352917-A352923 and the conjectures therein. - David Broadhurst, Apr 17 2022
This is also a lookup-table for a strategy of the 2-player 2-heap misere-Nim game (where a winning position is indicated by a XOR Nim-sum of the 2 heaps equal to zero). See e.g. A048833. - R. J. Mathar, Apr 29 2022
The set-theory analog of A093714 is essentially the same sequence as this. The definition is: b(0)=0; thereafter b(n+1) = smallest missing nonnegative integer which is different from b(n)+1 and whose binary expansion has no 1-bit in common with the binary expansion of b(n). This begins 0, 2, 1, 4, 3, 8, ..., and b(n) = a(n) for n > 2. - N. J. A. Sloane, May 07 2022

Examples

			a(6) = 5, which is 101 in binary. Of the terms not among (1,2,4,3,8,5), the earlier terms of the sequence, 10 (decimal) = 1010 (binary) is the smallest positive integer with no common 1-bits with the binary representation of 5.
Of the other positive integers not occurring earlier in the sequence (6 = 110 binary, 7 = 111 binary, 9 = 1001 binary), each has at least one 1-bit in common with 5 = 101 in binary.
So a(7) = 10.
To illustrate the formulas (3) & (4): The powers of two a(3) = 4, a(5) = 8, a(8) = 16, and a(15) = 32 are immediately followed by 3, 5, 6 and 7, respectively, which are the smallest numbers that did not occur earlier. - _M. F. Hasler_, Apr 03 2022
		

Crossrefs

For positions of powers of 2 see A305370.
Records: A352203, A352204; parity: A352569, A352570; written in binary: A352575.
Partial sums: A352781.
See also A093714, A305369, A352794.
The graphs of A109812, A252867, A305369, A305372 (bisection) all have roughly the same, mysterious, fractal-like structure. - N. J. A. Sloane, Jun 03 2018

Programs

Formula

It would be nice to have a formula or recurrence. - N. J. A. Sloane, Jun 02 2018
From M. F. Hasler, Apr 03 2022: (Start)
(1) If a(n) = 2^k and a(m) > 2^k then m > n: No term larger than 2^k can occur earlier than 2^k.
(2) For all k >= 0, a(n) = 2^k for some n <= 2^k: Any power of two will occur, not later than immediately after all smaller numbers.
(3) If a(n) = 2^k, and S(k) = {x < 2^k | x <> a(j) for all j < n} is not empty (which seems to be the case for all k > 1), then a(n+1) = min S(k): The smallest number less than a power of two that does not occur before it must occur immediately after it.
(4) If a(n) = 2^k with n < 2^k (probably true for all k > 1), then a(n+1) = min {x | x <> a(j) for all j <= n}. (End)

Extensions

More terms from John W. Layman, Aug 18 2005
Edited by N. J. A. Sloane, Jun 02 2018

A352920 Values of A109812(k) where k/A109812(k) reaches a new high point.

Original entry on oeis.org

1, 3, 6, 7, 31, 63, 127, 511, 4093, 4094, 4095, 16383, 32767, 262143
Offset: 1

Views

Author

David Broadhurst, Aug 17 2022 (entry created by N. J. A. Sloane, Apr 23 2022)

Keywords

Comments

The corresponding values of k are given in A352919.
This is a subset of A352336.
It is not necessary for a term of this sequence to be of the form 2^k - 1: there may be a zero close to the end of the binary expansion.
It appears that n/A109812(n) is unbounded. The reasoning behind this is as follows.
Consider terms A109812(k) that are the form 2^i - 1 (see the Examples section).
For such k, we necessarily have
a(k+1) = p(i)*2^i and a(k-1) = m(i)*2^i,
with integers p(i) and m(i). Let r(i) = max(p(i), m(i)).
Taking A109812(0) = 0, we have the following values:
i : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
p(i): 1 2 3 4 5 7 7 9 9 11 12 13 13 15 15 17 17 19 [A352921]
m(i): 0 1 4 3 6 6 8 8 10 10 11 14 14 16 18 18 18 20 [A352922]
r(i): 1 2 4 4 6 7 8 9 10 11 12 14 14 16 18 18 18 20 [A352923]
for i < 19. Furthermore, from the graphs in the entry A109812 it appears that r(19) = 21, r(20) = 22, r(21) = 22, r(22) = 24. The corresponding four values of k/aA109812(k) are, approximately, 6.42199, 6.80074, 6.88852, 7.39979.
This suggests the following conjecture:
Conjecture: r(k) > k for all k > 4.
Combining this with the conjecture that A109812(k)/k is bounded (see A352919 and A352920), we have:
Conjecture: k/A109812(k) is unbounded.

Examples

			Let c(k) denote A109812(k). The first 14 record high-points of k/c(k) are as follows:
[k/c(k), k, c(k), "binary(c(n))"]
[1.000000000 1 1 "1"]
[1.333333333 4 3 "11"]
[1.500000000 9 6 "110"]
[2.285714286 16 7 "111"]
[2.451612903 76 31 "11111"]
[2.571428571 162 63 "111111"]
[3.291338583 418 127 "1111111"]
[3.702544031 1892 511 "111111111"]
[4.665037870 19094 4093 "111111111101"]
[4.713727406 19298 4094 "111111111110"]
[4.898412698 20059 4095 "111111111111"]
[5.167124458 84653 16383 "11111111111111"]
[5.327494125 174566 32767 "111111111111111"]
[6.439611205 1688099 262143 "111111111111111111"]
The values of k and c(k) form A352919 and the present sequence.
		

Crossrefs

A352922 Let c(s) denote A109812(s). Suppose c(s) = 2^n - 1, and define m(n), p(n), r(n) by m(n) = c(s-1)/2^n, p(n) = c(s+1)/2^n, r(n) = max(m(n), p(n)); sequence gives m(n).

Original entry on oeis.org

0, 1, 4, 3, 6, 6, 8, 8, 10, 10, 11, 14, 14, 16, 18, 18, 18, 20
Offset: 1

Views

Author

David Broadhurst, Aug 17 2022 (entry created by N. J. A. Sloane, Apr 24 2022)

Keywords

Comments

The sequences m, p, r are well-defined since every number appears in A109812, and if A109812(s) = 2^n - 1, then by definition both A109812(s-1) and A109812(s+1) must be multiples of 2^n.
The sequences m, p, r are discussed in A352920.
(We assume A109812(0)=0 in order to get m(1)=0.)

Crossrefs

A352919 Indices k where k/A109812(k) reaches a new high point.

Original entry on oeis.org

1, 4, 9, 16, 76, 162, 418, 1892, 19094, 19298, 20059, 84653, 174566, 1688099
Offset: 1

Views

Author

David Broadhurst, Aug 17 2022 (entry created by N. J. A. Sloane, Apr 23 2022)

Keywords

Comments

The corresponding values of A109812(k) are given in A352920.
This is a subset of A352359.

Examples

			Let c(k) denote A109812(k). The first 14 record high-points of k/c(k) are as follows:
[k/c(k), k, c(k), "binary(c(n))"]
[1.000000000 1 1 "1"]
[1.333333333 4 3 "11"]
[1.500000000 9 6 "110"]
[2.285714286 16 7 "111"]
[2.451612903 76 31 "11111"]
[2.571428571 162 63 "111111"]
[3.291338583 418 127 "1111111"]
[3.702544031 1892 511 "111111111"]
[4.665037870 19094 4093 "111111111101"]
[4.713727406 19298 4094 "111111111110"]
[4.898412698 20059 4095 "111111111111"]
[5.167124458 84653 16383 "11111111111111"]
[5.327494125 174566 32767 "111111111111111"]
[6.439611205 1688099 262143 "111111111111111111"]
The values of k and c(k) form the present sequence and A352920.
		

Crossrefs

A352921 Let c(s) denote A109812(s). Suppose c(s) = 2^n - 1, and define m(n), p(n), r(n) by m(n) = c(s-1)/2^n, p(n) = c(s+1)/2^n, r(n) = max(m(n), p(n)); sequence gives p(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 9, 9, 11, 12, 13, 13, 15, 15, 17, 17, 19
Offset: 1

Views

Author

David Broadhurst, Aug 17 2022 (entry created by N. J. A. Sloane, Apr 24 2022)

Keywords

Comments

The sequences m, p, r are well-defined since every number appears in A109812, and if A109812(s) = 2^n - 1, then by definition both A109812(s-1) and A109812(s+1) must be multiples of 2^n.
The sequences m, p, r are discussed in A352920.

Crossrefs

Showing 1-5 of 5 results.