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.

A353604 Inverse permutation to A352633.

Original entry on oeis.org

1, 2, 5, 6, 3, 14, 9, 4, 7, 20, 17, 12, 23, 32, 39, 8, 13, 24, 29, 18, 21, 36, 47, 10, 15, 26, 55, 42, 51, 78, 53, 16, 19, 22, 11, 30, 25, 34, 59, 28, 37, 74, 57, 44, 99, 96, 87, 62, 49, 68, 81, 92, 71, 94, 85, 64, 111, 106, 123, 120, 109, 150, 167, 38, 31, 50
Offset: 1

Views

Author

Rémy Sigrist, May 07 2022

Keywords

Examples

			A352633(42) = 28 so a(28) = 42.
		

Crossrefs

Cf. A352633.

Programs

  • PARI
    See Links section.

A353989 a(1) = 1; a(2) = 3; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with a(n-1) and whose binary expansion has a 1-bit in common with the binary expansion of a(n-1).

Original entry on oeis.org

1, 3, 6, 2, 10, 8, 12, 4, 14, 7, 21, 9, 15, 5, 20, 16, 18, 22, 11, 33, 27, 24, 26, 13, 39, 30, 25, 35, 40, 28, 36, 32, 34, 38, 19, 57, 42, 44, 46, 23, 69, 45, 48, 50, 52, 54, 51, 17, 85, 55, 60, 56, 49, 63, 66, 58, 29, 87, 72, 62, 31, 93, 75, 65, 70, 64, 68, 74, 76, 78, 80, 82, 84, 77, 88, 86, 43
Offset: 1

Views

Author

Scott R. Shannon, May 13 2022

Keywords

Comments

This sequence is similar to the EKG sequence A064413 with the additional restriction that each term must share at least one 1-bit in common with the previous term in their binary expansions. The majority of terms are concentrated along the same three lines as in A064413 although at least three additional lines appear that contains fewer terms. See the linked image. Unlike A064413 the primes do not occur in their natural order and a prime p can be preceded and followed by multiples of p other than 2p and 3p respectively.
In the first 100000 terms the fixed points are 1, 16, 32, 209, 527, and it is likely no more exist. In the same range the lowest unseen number is 34849; the sequence is conjectured to be a permutation of the positive integers.
See A353245 for the binary AND operation of each pair of terms.

Examples

			a(3) = 6 as a(2) = 3, 6 = 110_2, 3 = 11_2, and 6 is the smallest unused number that shares a common factor with 3 and has a 1-bit in common with 3 in their binary expansions.
		

Crossrefs

A352763 a(1) = 1; a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with a(n-1) and whose binary expansion has no 1-bit in common with the binary expansion of a(n-1).

Original entry on oeis.org

1, 2, 4, 8, 6, 9, 18, 12, 3, 24, 32, 10, 5, 40, 16, 14, 48, 15, 80, 34, 17, 68, 26, 36, 27, 96, 20, 35, 28, 64, 22, 33, 30, 65, 50, 72, 21, 42, 69, 138, 52, 66, 44, 82, 41, 656, 38, 88, 128, 46, 144, 39, 192, 45, 130, 13, 208, 256, 54, 129, 60, 194, 56, 7, 112, 132, 11, 176, 70, 25, 100, 136, 51
Offset: 1

Views

Author

Scott R. Shannon, May 15 2022

Keywords

Comments

This sequence is similar to the EKG sequence A064413 with the additional restriction that no term can have a 1-bit in common with the previous term in their binary expansions. These restrictions lead to numerous terms being much larger than their preceding term, while the smaller terms overall show similar behavior to A109812. See the linked image. Unlike A064413 the primes do not occur in their natural order and the term following a prime can be a very large multiple of the prime.
In the first 50000 terms the fixed points are 1, 2, 105, 135, 225, 2157, 3972, 7009, 8531, although it is likely more exist. In the same range the lowest unseen number is 383; the sequence is conjectured to be a permutation of the positive integers.

Examples

			a(5) = 6 as a(4) = 8, 6 = 110_2, 8 = 1000_2, and 6 is the smallest unused number that shares a common factor with 8 but has no 1-bit in common with 8 in their binary expansions.
		

Crossrefs

A354087 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that shares a factor with a(n-1) and whose binary expansion has a single 1-bit in common with the binary expansion of a(n-1).

Original entry on oeis.org

1, 3, 6, 2, 10, 8, 12, 4, 14, 18, 15, 20, 5, 25, 35, 21, 9, 24, 16, 22, 11, 33, 27, 48, 26, 13, 52, 32, 34, 30, 36, 28, 7, 42, 49, 77, 56, 38, 19, 133, 57, 69, 46, 66, 39, 65, 45, 50, 40, 54, 68, 44, 70, 58, 72, 60, 74, 64, 76, 80, 55, 88, 96, 51, 78, 81, 102, 130, 62, 132, 63, 129, 43, 86, 104, 82
Offset: 1

Views

Author

Scott R. Shannon, May 17 2022

Keywords

Comments

This sequence is similar to the EKG sequence A064413 with the additional restriction that each term must share a single 1-bit in common with the previous term in their binary expansions. These restrictions lead to numerous terms being significantly larger than their preceding term, while the smaller terms overall show similar behavior to A109812. See the linked image. Unlike A064413 the primes do not occur in their natural order and both the proceeding and following terms of the primes can be large multiples of the prime.
In the first 100000 terms the fixed points are 1, 3, 30, 38, 350, 1603, 1936, 10176, 11976, 46123, 58471, 89870, although it is likely more exist. In the same range the lowest unseen number is 1019; the sequence is conjectured to be a permutation of the positive integers.

Examples

			a(6) = 8 as a(5) = 10, 8 = 1000_2, 10 = 1010_2, and 8 is the smallest unused number that shares a common factor with 10 and has a single 1-bit in common with 10 in their binary expansions. Note that 4 satisfies the first criterion but not the second.
		

Crossrefs

A355166 Lexicographically earliest sequence of distinct positive integers such for any n > 0, n and a(n) are coprime and have no common 1-bits in their binary expansions.

Original entry on oeis.org

2, 1, 4, 3, 8, 17, 16, 5, 20, 21, 32, 19, 18, 33, 64, 7, 6, 13, 12, 9, 10, 41, 40, 35, 34, 37, 68, 65, 66, 97, 96, 11, 14, 25, 24, 67, 26, 73, 80, 23, 22, 85, 84, 81, 82, 129, 128, 71, 72, 69, 76, 75, 74, 137, 136, 131, 70, 133, 132, 193, 130, 257, 256, 15, 28
Offset: 1

Views

Author

Rémy Sigrist, Jun 22 2022

Keywords

Comments

This sequence combines features of A065190 and of A238757.
This sequence is a self-inverse permutation of the nonnegative integers, without fixed points.
This sequence is well defined:
- if n is odd, then we can extend the sequence with a power of 2 > n,
- if n < 2^k is even, then we can extend the sequence with a prime number of the form 1 + t*2^k (Dirichlet's theorem on arithmetic progressions guarantees us that there is an infinity of such prime numbers).
When n is odd, a(n) is even and vice-versa.

Examples

			The first terms, alongside binary expansions and distinct prime factors, are:
  n   a(n)  bin(n)  bin(a(n))  dpf(n)  dpf(a(n))
  --  ----  ------  ---------  ------  ---------
   1     2       1         10  {}      {2}
   2     1      10          1  {2}     {}
   3     4      11        100  {3}     {2}
   4     3     100         11  {2}     {3}
   5     8     101       1000  {5}     {2}
   6    17     110      10001  {2, 3}  {17}
   7    16     111      10000  {7}     {2}
   8     5    1000        101  {2}     {5}
   9    20    1001      10100  {3}     {2, 5}
  10    21    1010      10101  {2, 5}  {3, 7}
		

Crossrefs

Programs

  • PARI
    See Links section.
    
  • Python
    from math import gcd
    from itertools import count, islice
    def agen(): # generator of terms
        aset, mink = set(), 1
        for n in count(1):
            an = mink
            while an in aset or n&an or gcd(n, an)!=1: an += 1
            aset.add(an); yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 65))) # Michael S. Branicky, Jun 22 2022
Showing 1-5 of 5 results.