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 12 results. Next

A357148 a(n) = A357082(n-1) + A357082(n).

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 16, 15, 16, 24, 29, 32, 33, 29, 34, 29, 32, 36, 34, 42, 61, 64, 34, 32, 61, 64, 61, 64, 61, 64, 65, 72, 76, 64, 72, 85, 76, 64, 72, 82, 64, 72, 100, 104, 100, 91, 64, 72, 64, 72, 104, 100, 116, 127, 128, 129, 133, 128, 129, 128, 129, 128, 129
Offset: 1

Views

Author

Michael De Vlieger, Sep 15 2022

Keywords

Crossrefs

Cf. A357082.

Programs

A357149 a(n) = smallest missing number in A357082(k) for k = 0..n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45
Offset: 0

Views

Author

Michael De Vlieger, Sep 15 2022

Keywords

Crossrefs

Cf. A357082.

Programs

A357166 If n appears in A357082, then a(n) is the unique k such that A357082(k) = n; otherwise a(n) = -1.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Sep 16 2022

Keywords

Examples

			A357082(42) = 47, hence a(47) = 42.
		

Crossrefs

Cf. A357082.

Programs

  • PARI
    See Links section.
    
  • Perl
    See Links section.
    
  • Python
    from itertools import islice
    def agen():
        aset, appearsat, astr, an, mink, nn = {0}, {0: 0}, "0", 0, 1, 0
        for n in count(1):
            k = mink
            while k in aset or bin(an+k)[2:] in astr: k += 1
            while mink in aset: mink += 1
            an = k; aset.add(an); astr += bin(an)[2:]; appearsat[an] = n
            while nn in appearsat: yield appearsat[nn]; nn += 1
    print(list(islice(agen(), 68))) # Michael S. Branicky, Sep 16 2022

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

Original entry on oeis.org

0, 1, 3, 5, 9, 17, 7, 23, 2, 12, 22, 6, 16, 37, 58, 10, 38, 4, 32, 60, 14, 48, 82, 8, 42, 85, 15, 61, 107, 11, 67, 131, 18, 86, 13, 77, 141, 21, 89, 25, 93, 20, 84, 148, 19, 83, 147, 27, 91, 155, 26, 90, 154, 24, 88, 152, 28, 92, 156, 36, 100, 164, 30, 94, 158, 29, 142, 78, 191, 31, 95, 159
Offset: 0

Views

Author

Scott R. Shannon, Sep 12 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 1199 and 14767. It is unknown if more exist.

Examples

			a(5) = 17 as the concatenation of a(0)..a(4) in binary is "01111011001" and |17 - a(4)| = |17 - 9| = 8 = 1000_2 which does not appear in the concatenated string. Since 1 = 1_2, 2 = 10_2, 3 = 11_2, 4 = 100_2, 5 = 101_2, 6 = 110_2, 7 = 111_2 all appear in the concatenated string, a(5) cannot be less than 17.
		

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 += bin(an)[2:]
            prevan, an = an, mink
            while an + mindiff <= prevan and (an in aset or bin(abs(an-prevan))[2:] in astr): an += 1
            if an in aset or bin(abs(an-prevan))[2:] in astr:
                an = max(mink, prevan + mindiff)
                while an in aset or bin(an-prevan)[2:] in astr:
                    an += 1
            while mink in aset: mink += 1
            while bin(mindiff)[2:] in astr: mindiff += 1
    print(list(islice(agen(), 72))) # Michael S. Branicky, Oct 05 2022

A363186 Lexicographically earliest sequence of distinct positive integers such that the sum of all terms a(1)..a(n) is a substring of the concatenation of all terms a(1)..a(n).

Original entry on oeis.org

1, 10, 98, 767, 111, 122, 2, 11, 100, 889, 110, 4490, 400, 560, 1096, 124, 20, 129, 70, 502, 93, 171, 212, 361, 512, 26, 21, 36, 54, 14, 1011, 139, 99, 59, 550, 684, 345, 102, 1021, 1999, 2871, 137, 892, 89, 126, 875, 510, 994, 586, 2012, 662, 1836, 201, 405, 388, 2007, 2798, 1641, 50, 340
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, Jul 07 2023

Keywords

Comments

In the first 10000 terms the smallest number that has not yet appeared is 696; it is therefore likely all numbers eventually appear although this is unknown.

Examples

			a(2) = 10 as a(1) + 10 = 1 + 10 = 11 which is a substring of "1" + "10" = "110".
a(3) = 98 as a(1) + a(2) + 98 = 1 + 10 + 98 = 109 which is a substring of "1" + "10" + "98" = "11098".
a(4) = 767 as a(1) + a(2) + a(3) + 767 = 1 + 10 + 98 + 767 = 876 which is a substring of "1" + "10" + "98" + "767" = "11098767".
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        s, mink, aset, concat = 1, 2, {1}, "1"
        yield from [1]
        while True:
            an = mink
            while an in aset or not str(s+an) in concat+str(an): an += 1
            aset.add(an); s += an; concat += str(an); yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 60))) # Michael S. Branicky, Feb 08 2024

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

A357150 Primitive terms in A357148.

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 16, 24, 29, 32, 33, 34, 36, 42, 61, 64, 65, 72, 76, 82, 85, 91, 100, 104, 116, 127, 128, 129, 133, 144, 146, 153, 154, 169, 172, 179, 192, 209, 224, 256, 257, 258, 260, 262, 264, 270, 276, 281, 303, 322, 325, 339, 355, 356, 360, 400, 417, 418
Offset: 1

Views

Author

Michael De Vlieger, Sep 15 2022

Keywords

Examples

			Let b(n) = A357082(n).
3 is in the sequence since S = b(1) + b(2) = 1 + 2 = 3. Since b(3) = 3, it is not possible to see S = 3 again.
4 is not in the sequence since no sum S = 4 appears before b(4) = 4 = "100" in binary, whereafter "100" is appended to W, and thereafter prohibited as a sum of adjacent terms in b for n > 4.
32 is in the sequence since S = b(11) + b(12) = b(16) + b(17) = b(23) + b(24) = 32. We note that b(31) = 32, therefore these are the only instances of sum S = 32.
		

Crossrefs

Programs

  • Mathematica
    nn = 650; s[] = c[] = False; j = 0; i = u = 1; w = "0"; b = Reap[Do[k = u; While[Or[c[k], StringContainsQ[w, Set[v, IntegerString[j + k, 2]]]], k++]; c[k] = True; Sow[k]; If[! s[#], Set[{a[i], s[#]}, {#, True}]; i++] &[j + k]; Set[{j, w}, {k, w <> IntegerString[k, 2]}]; If[k == u, While[c[u], u++]], {n, nn}] ][[-1, -1]]; TakeWhile[Array[a, i - 1], MemberQ[b, #] &]

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

A360521 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that neither the binary string a(n-1) + a(n) nor the same string reversed 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, 9, 7, 17, 15, 18, 14, 19, 13, 20, 12, 21, 11, 22, 26, 8, 24, 27, 37, 28, 23, 25, 39, 29, 35, 30, 34, 31, 33, 32, 36, 41, 44, 43, 42, 38, 62, 57, 70, 58, 69, 59, 68, 60, 67, 61, 66, 63, 64, 65, 71, 76, 52, 84, 72, 56, 80, 48, 88, 40, 96, 51, 77, 83, 45, 91, 81, 47, 89, 86
Offset: 0

Views

Author

Scott R. Shannon, Feb 09 2023

Keywords

Comments

As in A357082 the main concentration of terms is along the line a(n) = n, so there are numerous fixed points - there are 24 fixed points in the first 200000 terms. The sequence is conjectured to be a permutation of the positive integers.
Note that when the binary string of a(n-1) + a(n) is reversed any resulting leading 0's are retained for the string comparison.

Examples

			a(11) = 15 as the concatenation of a(0)..a(10) in binary is "0110111001011010110100111110001" and a(10) + 15 = 17 + 15 = 32 = 100000_2 which does not appear in the concatenated string, nor does its reverse "000001". Although 17 + 12 = 29 = 11101_2 does not appear in the string its reverse "10111" does, so a(11) cannot be 12. This is the first term to differ from A357082.
		

Crossrefs

Programs

Showing 1-10 of 12 results. Next