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-4 of 4 results.

A357377 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that |a(n) - a(n-1)| does not appear in the string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 2, 6, 10, 14, 22, 4, 12, 20, 28, 44, 8, 24, 40, 56, 18, 34, 50, 23, 39, 55, 26, 42, 58, 29, 45, 61, 31, 47, 63, 27, 43, 59, 75, 37, 53, 69, 85, 36, 52, 68, 30, 46, 62, 78, 94, 110, 33, 49, 65, 81, 97, 113, 41, 57, 73, 35, 51, 67, 105, 143, 16, 54
Offset: 0

Views

Author

Scott R. Shannon, Sep 26 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 200000 terms the only fixed points are 20, 24, 43 and 115. It is likely no more exist although this is unknown.
There are no other fixed points in the first 870000 terms. - Michael S. Branicky, Oct 05 2022

Examples

			a(12) = 25 as the concatenation of a(0)..a(11) is "013579111315171921" and |25 - a(11)| = |25 - 21| = 4 which does not appear in the concatenated string. Since a(11) contains a '2' and all other odd numbers appear in the string a(12) cannot be 23 or any even number less than 25.
a(13) = 2 as the concatenation of a(0)..a(12) is "01357911131517192125" and |2 - a(12)| = |2 - 25| = 23 which does not appear in the concatenated string.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, astr, an, mink, mindiff = [], set(), "", 0, 1, 1
        for n in count(0):
            yield an; aset.add(an); astr += str(an)
            prevan, an = an, mink
            while an + mindiff <= prevan and (an in aset or str(abs(an-prevan)) in astr): an += 1
            if an in aset or str(abs(an-prevan)) in astr:
                an = max(mink, prevan + mindiff)
                while an in aset or str(an-prevan) in astr:
                    an += 1
            while mink in aset: mink += 1
            while str(mindiff) in astr: mindiff += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, Oct 05 2022

A357449 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of a(n) plus the largest previous term does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 9, 14, 15, 16, 17, 18, 20, 12, 24, 8, 28, 26, 30, 22, 33, 11, 21, 31, 32, 36, 37, 27, 35, 41, 13, 23, 40, 44, 38, 62, 46, 66, 19, 42, 63, 65, 69, 39, 59, 60, 68, 72, 56, 57, 71, 76, 52, 53, 80, 48, 49, 55, 58, 61, 64, 83, 45, 73, 77, 81, 82, 85, 43, 50, 75, 79, 87, 51
Offset: 0

Views

Author

Scott R. Shannon, Sep 29 2022

Keywords

Comments

The main concentration of terms lies near the line a(n) = n; there are 26 fixed points in the first 100000 terms. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(9) = 9 as the concatenation of a(0)..a(8) in binary is "0110111001011010110111" and 9 plus the largest previous term = 9 + 10 = 19 = 10011_2 which does not appear in the concatenated string. Since 10 + 8 = 18 = 10010_2 appears in the concatenated string, a(9) cannot be 8.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen():
        aset, astr, an, mink = {0}, "0", 0, 1
        while True:
            yield an; k, m = mink, max(aset)
            while k in aset or bin(m+k)[2:] in astr: k += 1
            while mink in aset: mink += 1
            an = k; aset.add(an); astr += bin(an)[2:]
    print(list(islice(agen(), 77))) # Michael S. Branicky, Sep 29 2022

A359858 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the ones' complement of the binary string of a(n-1) + a(n) does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 2, 6, 5, 3, 8, 14, 18, 20, 12, 24, 23, 9, 27, 37, 10, 22, 25, 7, 40, 39, 52, 42, 49, 15, 32, 59, 35, 56, 38, 53, 41, 50, 44, 47, 81, 13, 78, 16, 75, 57, 34, 94, 61, 30, 98, 60, 31, 97, 58, 33, 122, 63, 28, 127, 55, 36, 126, 65, 118, 67, 95, 88, 74, 109, 76, 86, 99, 84, 101, 82, 80, 103, 187
Offset: 0

Views

Author

Scott R. Shannon, Jan 16 2023

Keywords

Comments

In the first 100000 terms the fixed points are 55, 123, 1779, 2009, although it is likely more exist. The sequence is conjectured to be a permutation of the positive integers. Note that 1 does not appear until the 160th term.

Examples

			a(3) = 5 as the concatenation of a(0)..a(2) in binary is "010110" and a(2) + 5 = 6 + 5 = 11 = 1011_2 whose ones' complement = 100_2, which does not appear in the concatenated string. Note the ones' complements of 6+1, 6+3, 6+4 are 0_2, 110_2, 101_2, all of which appear in the concatenated string.
		

Crossrefs

A357482 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of the number of 1's in the binary value of a(n) + the number of 1's in the binary values of all previous terms does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 7, 4, 5, 63, 8, 6, 9, 16, 127, 11, 10, 12, 13, 14, 19, 511, 1023, 15, 21, 17, 31, 18, 20, 22, 24, 25, 33, 23, 27, 26, 28, 35, 37, 38, 41, 1535, 29, 30, 32, 34, 47, 36, 40, 55, 39, 43, 42, 45, 255, 46, 51, 383, 48, 44, 4095, 64, 447, 65, 95, 53, 191, 767, 1791, 59, 49, 54, 57, 50, 52
Offset: 0

Views

Author

Scott R. Shannon, Sep 30 2022

Keywords

Comments

The sequence contains large jumps in value due to some terms having to be 1 less than a power of 2 to contain sufficient 1's in their binary value to meet the term selection criteria. For example a(386) = 512, a(387) = 68719476735. See the examples below.

Examples

			a(7) = 63 as 63 = 111111_2 which contains six 1's, the concatenation of the binary values of a(0)..a(6) is "011011111100101" which contains ten 1's, and 6 + 10 = 16 = 10000_2 which does not appear in the concatenated binary string of previous terms. All smaller unused numbers less than 63 have one to five 1's in their binary values leading to sums of 11, 12, 13, 14 or 15, but the binary values of these five sums all appear in the concatenated binary string of previous terms.
		

Crossrefs

Showing 1-4 of 4 results.