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-10 of 13 results. Next

A115511 Inverse permutation to sequence A115510.

Original entry on oeis.org

1, 3, 2, 5, 6, 4, 7, 9, 8, 10, 11, 12, 13, 14, 15, 17, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 64, 66, 67, 68, 69, 70, 71, 72
Offset: 1

Views

Author

Leroy Quet, Jan 23 2006

Keywords

Examples

			A115510(4) = 6, hence a(6) = 4; A115510(5) = 4, hence a(4) = 5; A115510(6) = 5, hence a(5) = 6.
		

Crossrefs

Cf. A115510.

Extensions

Corrected and extended by Klaus Brockhaus, Jan 24 2006

A352202 a(n) = binary weight of A115510(n).

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 3, 4, 2, 1, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 1, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 1, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4
Offset: 1

Views

Author

N. J. A. Sloane, Mar 27 2022

Keywords

Crossrefs

Cf. A115510.

A353728 A115510(n) written in base 2.

Original entry on oeis.org

1, 11, 10, 110, 100, 101, 111, 1001, 1000, 1010, 1011, 1100, 1101, 1110, 1111, 10001, 10000, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100001, 100000, 100010, 100011, 100100, 100101, 100110, 100111, 101000, 101001, 101010, 101011, 101100, 101101, 101110, 101111
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    def A353728_gen(): # generator of terms
        yield 1
        l1, s, b = 1, 2, set()
        while True:
            i = s
            while True:
                if i & l1 and not i in b:
                    yield int(bin(i)[2:])
                    l1 = i
                    b.add(i)
                    while s in b:
                        b.remove(s)
                        s += 1
                    break
                i += 1
    A353728_list = list(islice(A353728_gen(),30)) # Chai Wah Wu, May 13 2022

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

A305369 Lexicographically earliest sequence of distinct positive integers such that for each 1 in the binary expansion of a(n), exactly one of a(n-1) and a(n+1) has a 1 in the same position.

Original entry on oeis.org

1, 3, 2, 4, 5, 9, 8, 6, 7, 17, 16, 10, 11, 21, 20, 32, 33, 13, 12, 18, 19, 37, 36, 24, 25, 35, 34, 28, 29, 65, 64, 14, 15, 49, 48, 66, 67, 41, 40, 22, 23, 73, 72, 38, 39, 81, 80, 42, 43, 69, 68, 26, 27, 97, 96, 30, 31, 129, 128, 44, 45, 83, 82, 132, 133, 51, 50, 76, 77, 131, 130, 52, 53, 75, 74, 144, 145, 47, 46, 192
Offset: 1

Views

Author

N. J. A. Sloane, Jun 02 2018

Keywords

Comments

This is to A280864 as A115510 is to A064413 (EKG) and A252867 is to A098550 (Yellowstone).

Examples

			After a(1) = 1, a(2) is the smallest missing odd number, so a(2) = 3.
a(3) is then the smallest missing number of the form ...1*_2, so a(3) = 10_2 = 2.
After a(15) = 20 = 10100_2, a(16) is the smallest missing number of the form ...0*0**_2, which is 100000_2 = 32.
		

References

  • Empirical: a(4k) = 2*Q(2k), a(4k+1) = a(4k)+1, a(4k+2) = 2*Q(2k+1)+1, a(4k+3) = 2*Q(2k+1), where Q (for Quet) is A109812. Since Q has a simpler definition, there is hope for a proof of this connection.

Crossrefs

Cf. A280864, A252867, A098550, A115510, A064413, A109812, A352578 (binary weight).
The graphs of A109812, A252867, A305369, A305372 all have roughly the same, mysterious, fractal-like structure. - N. J. A. Sloane, Jun 03 2018

A226077 a(1)=1; a(n) = smallest positive integer not yet in the sequence, such that a(n) and a(n-1) have exactly one common 1-bit in their binary representations.

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 9, 7, 10, 8, 11, 12, 20, 13, 17, 15, 18, 14, 19, 16, 21, 24, 22, 25, 33, 23, 34, 26, 35, 29, 36, 28, 37, 27, 38, 32, 39, 40, 30, 41, 48, 31, 65, 43, 52, 42, 49, 44, 50, 45, 67, 46, 66, 47, 68, 53, 70, 51, 69, 54, 74, 55, 73, 56, 72, 57, 71, 58, 76, 59, 80, 60, 75, 64, 77, 82, 61, 96, 62, 81, 78, 97, 84, 98, 85, 104, 83, 100, 88
Offset: 1

Views

Author

Paul Tek, May 25 2013

Keywords

Comments

A000120(a(n) & a(n+1))=1, where & stands for the bitwise AND operator.
Permutation of the natural numbers with inverse A226093. - Reinhard Zumkeller, May 26 2013

Examples

			a(1)=1 by definition.
A000120(a(1) & 2)=0, A000120(a(1) & 3)=1, hence a(2)=3.
A000120(a(2) & 2)=1, hence a(3)=2.
A000120(a(3) & 4)=0, A000120(a(3) & 5)=0, A000120(a(3) & 6)=1, hence a(4)=6.
A000120(a(4) & 4)=1, hence a(5)=4.
A000120(a(5) & 5)=1, hence a(6)=5.
A000120(a(6) & 7)=2, A000120(a(6) & 8)=0, A000120(a(6) & 9)=1, hence a(7)=9.
A000120(a(7) & 7)=1, hence a(8)=7.
A000120(a(8) & 8)=0, A000120(a(8) & 10)=1, hence a(9)=10.
A000120(a(9) & 8)=1, hence a(10)=8.
		

Crossrefs

Programs

  • Haskell
    import Data.Bits ((.&.))
    import Data.List (delete)
    a226077 n = a226077_list !! (n-1)
    a226077_list = 1 : f 1 [2..] where
       f :: Integer -> [Integer] -> [Integer]
       f x zs = g zs where
         g (y:ys) | a209229 (x .&. y) == 0 = g ys
                  | otherwise = y : f y (delete y zs)
    -- Reinhard Zumkeller, May 26 2013

A158814 Multiples of 10 in the EKG sequence A064413.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 350, 340, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570
Offset: 1

Views

Author

Paul Curtz, Mar 27 2009

Keywords

Comments

The first 33 terms are regular, as in A008592.
The multiples of 1 is A064413 itself. The multiples of 2 is A064469. The multiples of 3 are 3*A155963(n).
The first 15 multiples of 4 are 4*A115510, but then become different. The multiples of 5 are A158486,
also represented by A158504. The first 85 multiples of 6 coincide with A008588(1..85), then deviate.
The first 56 multiples of 9 are A008591(1..56), and then deviate. Multiples of 13 are in A158605.

Extensions

Edited and extended by R. J. Mathar, Apr 04 2009
Corrected by Paul Curtz, Apr 17 2009

A370631 Lexicographically earliest sequence of distinct positive integers such that the Zeckendorf expansions of two consecutive terms have at least one common term.

Original entry on oeis.org

1, 4, 3, 11, 8, 9, 6, 5, 7, 2, 10, 12, 14, 13, 15, 16, 17, 18, 19, 20, 23, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 57, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67
Offset: 1

Views

Author

Rémy Sigrist, May 01 2024

Keywords

Comments

This sequence is a permutation of the positive integers with inverse A370632:
- for k >= 7, the values whose Zeckendorf expansions have largest term A000045(k) appear in a single run of consecutive values; the first value being A000045(k) + 1 or 2, the second value being A000045(k), the remaining values appearing in ascending order.

Examples

			The first terms, alongside the Zeckendorf expansion in binary of a(n), are:
  n   a(n)  z(a(n))
  --  ----  -------
   1     1        1
   2     4      101
   3     3      100
   4    11    10100
   5     8    10000
   6     9    10001
   7     6     1001
   8     5     1000
   9     7     1010
  10     2       10
  11    10    10010
  12    12    10101
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

A000120(A003714(a(n)), A003714(a(n+1))) > 0.

A375828 a(1) = 1; for n > 1, a(n) is the smallest unused positive number such that (a(n-1) AND a(n)) = a(n-1) if a(n-1) is prime, otherwise (a(n-1) AND a(n)) = 0, where AND is the binary AND operation.

Original entry on oeis.org

1, 2, 3, 7, 15, 16, 4, 8, 5, 13, 29, 31, 63, 64, 6, 9, 18, 12, 17, 19, 23, 55, 72, 20, 10, 21, 32, 11, 27, 36, 24, 33, 14, 48, 65, 22, 40, 66, 25, 34, 28, 35, 68, 26, 37, 39, 80, 38, 73, 75, 52, 67, 71, 79, 95, 128, 30, 96, 129, 42, 69, 50, 76, 49, 70, 41, 43, 47, 111, 144, 44, 81, 46, 145, 74, 53, 61, 125, 130, 45, 82, 132, 51, 136, 54, 137, 139, 143, 112
Offset: 1

Views

Author

Scott R. Shannon, Aug 30 2024

Keywords

Comments

The terms form a pattern similar to that in A109812. In the first 250000 terms the fixed points are 1, 2, 3, 8, 3650, 50624, 203074. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(5) = 15 as a(4) = 7 = 111_2 is prime, and ((15 = 1111_2) AND 111_2) = 111_2 = 7.
a(6) = 16 as a(5) = 15 = 1111_2 is not prime, and ((16 = 10000_2) AND 1111_2) = 0.
		

Crossrefs

A375829 a(1) = 1; for n > 1, a(n) is the smallest unused positive number such that (a(n-1) AND a(n)) = 0 if a(n-1) is prime, otherwise (a(n-1) AND a(n)) = a(n-1), where AND is the binary AND operation.

Original entry on oeis.org

1, 3, 4, 5, 2, 8, 9, 11, 16, 17, 6, 7, 24, 25, 27, 31, 32, 33, 35, 39, 47, 64, 65, 67, 12, 13, 18, 19, 36, 37, 10, 14, 15, 63, 127, 128, 129, 131, 20, 21, 23, 40, 41, 22, 30, 62, 126, 254, 255, 511, 1023, 2047, 4095, 8191, 8192, 8193, 8195, 8199, 8207, 8223, 8255, 8319, 8447, 256, 257, 26, 58, 59, 68, 69, 71, 48, 49, 51, 55, 119, 247, 503, 512, 513, 515, 519
Offset: 1

Views

Author

Scott R. Shannon, Aug 30 2024

Keywords

Comments

The long term behavior of the terms is dominated by the appearance of the Mersenne primes. This is due to composite numbers appearing which are 1 less than a power of 2, i.e., their binary representation consists of all 1's. Therefore the next term must be 1 less than the next power of 2 to satisfy (a(n-1) AND a(n)) = a(n-1). This pattern repeats until such a number is prime, i.e., a Mersenne prime, at which point the next term will be 1 more than this prime, after which the terms can eventually return to smaller values.
Due to the above behavior it is unknown if all numbers eventually appear, but assuming the number of Mersenne primes is infinite, it is likely all eventually will. In the first 100 terms the fixed points are 1, 71, 463, although more likely exist.

Examples

			a(7) = 9 as a(6) = 8 = 1000_2 is not prime, and ((9 = 1001_2) AND 1000_2) = 1000_2 = 8.
a(9) = 16 as a(8) = 11 = 1011_2 is prime, and ((16 = 10000_2) AND 1011_2) = 0.
		

Crossrefs

Showing 1-10 of 13 results. Next