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

A130576 Record values in A130571.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 30, 31, 32, 33, 40, 41, 42, 43, 44, 50, 51, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 100, 101, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 05 2007

Keywords

Comments

a(n)=A130571(A130577(n)); A130571(i)A130577(i);
for n<=54 the sequence coincides with A009996, A032873, A032907, A072543 and A084383.

A114801 2-concatenation-free sequence starting (1,2).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 121, 123, 124, 125, 126, 127, 128, 129, 131, 132, 134, 135, 136, 137, 138, 139, 141, 142, 143, 145, 146, 147, 148, 149, 151, 152, 153, 154, 156, 157, 158
Offset: 1

Views

Author

Jonathan Vos Post, Feb 18 2006

Keywords

Comments

Starting with the terms (1,2) this sequence consists of minimum increasing terms such that no term is the concatenation of any two previous distinct terms. The next consecutive number skipped after 121 is 122 = Concatenate(1, 22). This is the analog of a 2-Stöhr sequence with concatenation (base 10) substituting for addition. A033627 "0-additive sequence: not the sum of any previous pair" is another name for the 2-Stöhr sequence.

Crossrefs

Programs

  • Mathematica
    conc[x_, y_] := FromDigits@ Flatten@ IntegerDigits[{x, y}]; L = {1, 2}; cc = {12, 21}; Do[k = 1 + Max@L; While[MemberQ[cc, k], k++]; cc = Union[cc, conc[#, k] & /@ L, conc[k, #] & /@ L]; AppendTo[L, k];, {65}]; L (* Giovanni Resta, Jun 15 2016 *)
  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        cats1, cats2, an, s = {"1", "2"}, {"12", "21"}, 3, "3"
        yield from [1, 2]
        while True:
            yield an
            cats2 |= {s + c for c in cats1} | {c + s for c in cats1}
            cats1.add(s)
            while (s:=str(an)) in cats1 or s in cats2:
                an += 1
    print(list(islice(agen(), 59))) # Michael S. Branicky, Feb 01 2024

Formula

a(0) = 1, a(1) = 2, for n>2: a(n) = least k > a(n-1) such that k is not an element of {Concatenate(a(i), a(j))} for any distinct a(i) <= a(n-1) and a(j) <= a(n-1).

Extensions

Data corrected by Giovanni Resta, Jun 14 2016

A114802 3-concatenation-free sequence starting (1,2).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 121, 131, 141, 151, 161, 171, 181, 191, 200, 212, 232, 242, 252, 262, 272, 282, 292, 300, 313, 323, 343, 353, 363, 373, 383, 393, 400, 414, 424, 434, 454
Offset: 1

Views

Author

Jonathan Vos Post, Feb 18 2006

Keywords

Comments

Starting with the terms (1,2) this sequence consists of minimum increasing integer terms such that no term is the concatenation of any two or three previous distinct terms. The next consecutive numbers skipped after 121 are 122 = Concatenate(1,22) and 123 = Concatenate(1,2,3). This is the analog of a 3-Stöhr sequence with concatenation (base 10) substituting for addition. A026474 is a 3-Stöhr sequence.

Crossrefs

Programs

  • Mathematica
    conc[w_] := Flatten[ (FromDigits /@ Flatten /@ IntegerDigits /@ (Permutations[#]) &) /@ Subsets[w, {2, 3}]]; up = 10^3; L = {1, 2, 3}; cc = conc[L]; Do[k = 1 + Max@L; While[MemberQ[cc, k], k++]; If[k > up, Break[]]; Do[cc = Union[cc, Select[ conc[{k, L[[i]], L[[j]]}], # <= up &]], {i, Length[L]}, {j, i - 1}]; AppendTo[L, k], {60}]; L (* Giovanni Resta, Jun 15 2016 *)
  • Python
    from itertools import islice
    def incats(s, L, k):
        if s == "": return True
        if k == 0: return False
        return any(s.startswith(w) and incats(s[len(w):], L[:i]+L[i+1:], k-1) for i, w in enumerate(L))
    def agen(): # generator of terms
        L, an, s = ["1", "2"], 3, "3"
        yield from [1, 2]
        while True:
            yield an
            L.append(s)
            while incats((s:=str(an)), L, 3):
                an += 1
    print(list(islice(agen(), 70))) # Michael S. Branicky, Feb 01 2024

Formula

a(0) = 1, a(1) = 2, for n>2: a(n) = least k > a(n-1) such that k is not an element of {Concatenate[a(h),a(i),a(j)]} or {Concatenate[a(i),a(j)]} for any three distinct a(h), a(i), and a(j), where h, i, j < n.

Extensions

Corrected and edited by Giovanni Resta, Jun 15 2016
Showing 1-3 of 3 results.