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.

A226093 Inverse permutation to A226077.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 26 2013

Keywords

Programs

  • Haskell
    a226093 = (+ 1) . fromJust . (`elemIndex` a226077_list)

A115510 a(1)=1. a(n) is smallest positive integer not occurring earlier in the sequence such that a(n) and a(n-1) have at least one 1-bit in the same position when they are written in binary.

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 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

Comments

Sequence is a permutation of the positive integers. A115511 is the inverse permutation.
This can be regarded as a set-theoretic analog of A064413. - N. J. A. Sloane, Sep 06 2021

Examples

			a(3) = 2 = 10 in binary. Among the positive integers not occurring among the first 3 terms of the sequence (4 = 100 in binary, 5 = 101 in binary, 6 = 110 in binary,...), 6 is the smallest that shares at least one 1-bit with a(3) when written in binary. So a(4) = 6.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {1}, k}, Do[k = 1; While[Or[BitAnd[Last@ a, k ] == 0, MemberQ[a, k]], k++]; AppendTo[a, k], {71}]; a] (* Michael De Vlieger, Sep 07 2017 *)
  • Python
    A115510_list, l1, s, b = [1], 1, 2, set()
    for _ in range(10**6):
        i = s
        while True:
            if not i in b and i & l1:
                A115510_list.append(i)
                l1 = i
                b.add(i)
                while s in b:
                    b.remove(s)
                    s += 1
                break
            i += 1 # Chai Wah Wu, Sep 24 2021

Formula

(4,6,5) is a 3-cycle and (2^k,2^k+1) for k = 1 and k > 2 are 2-cycles; all other numbers are fixed points. - Klaus Brockhaus, Jan 24 2006
In other words, a(2^k)=2^k+1 for k >= 3, a(2^k+1) = 2^k for k>=3, and otherwise a(n) = n for n >= 7. - N. J. A. Sloane, Mar 25 2022

Extensions

More terms from Klaus Brockhaus, Jan 24 2006

A230598 Lexicographically earliest sequence of distinct positive integers such that all black pixels in the binary plot of the sequence are connected (see Comments for details).

Original entry on oeis.org

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

Views

Author

Paul Tek, Oct 24 2013

Keywords

Comments

For any n, m, i, j such that a(n) AND (2^i) <> 0, and a(m) AND (2^j) <>0 (where AND stands for the bitwise AND operator), there exist two sequences of finite length L, say p and b, such that:
(1) p(1)=n, b(1)=i,
(2) p(L)=m, b(L)=j,
(3) a(p(k)) AND (2^b(k)) <> 0 for any k between 1 and L,
(4) |p(k+1)-p(k)| + |b(k+1)-b(k)| = 1 for any k between 1 and L-1.
These two finite sequences define a path of black pixels connecting the black pixels at positions (n,i) and (m,j).

Crossrefs

Programs

  • Perl
    See Link section.

Formula

Empirically, for any k>2 :
(1) a(2^k-1) = 2^k-1,
(2) a(2^k) = 2^k+1,
(3) a(n) = a(n-2^k+1) + 2^k, for any n such that 2^k<=n<2^(k+1)-(k+1),
(4) a(n) = 2^k, for n=2^(k+1)-(k+1),
(5) a(n) = a(n-2^k) + 2^k, for any n such that 2^(k+1)-(k+1)

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

Original entry on oeis.org

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

Author

Rémy Sigrist, May 01 2024

Keywords

Comments

Conjecture: this sequence is a permutation of the positive integers.

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))) = 1.

A352670 a(n) is the smallest positive integer not yet in the sequence such that the binary representation of a(n) AND a(n-1) contains exactly two 1-bits, starting a(1) = 3.

Original entry on oeis.org

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

Author

Alois P. Heinz, Mar 28 2022

Keywords

Comments

This is a permutation of the positive nonpowers of 2, or of { A057716 } \ {0}.

Crossrefs

Showing 1-5 of 5 results.