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

A302173 Lexicographically first sequence of distinct terms such that any set of three successive digits can be reordered as {d, d+1, d+2}, d being the smallest of the three digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 78, 67, 56, 45, 34, 23, 12, 31, 20, 120, 123, 42, 312, 342, 345, 64, 53, 423, 453, 456, 75, 645, 675, 678, 97, 86, 756, 786, 789, 7867, 89, 7897, 867, 564, 534, 231, 201, 234, 567, 897, 8675, 6453, 4231, 2012, 3120, 1201, 2312, 3123, 1231, 2342, 3423, 1234, 2345
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 03 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {1,0,9} and {8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 78 because 78 is the smallest integer not yet in the sequence such that the elements of the sets {8,9,7} and {9,7,8} are three consecutive digits;
a(12) is 67 because 67 is the smallest integer not yet in the sequence such that the elements of the sets {7,8,6} and {8,6,7} are three consecutive digits;
a(13) is 56 because 56 is the smallest integer not yet in the sequence such that the elements of the sets {6,7,5} and {7,5,6} are three consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits.

Programs

  • Python
    a, runLength = [i for i in range(10)], 3
    def helper(s,k,l,a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i),int(str(k)+str(i)),l,a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str,a)))[(1-runLength):],0,runLength,a))
    print(a) # Dominic McCarty, Feb 02 2025

A302499 Lexicographically first sequence of distinct terms such that any set of four successive digits can be reordered as {d, d+1, d+2, d+3}, d being the smallest of the four digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 67, 85, 674, 56, 34, 52, 341, 23, 41, 230, 12, 30, 123, 45, 63, 452, 345, 234, 523, 412, 301, 2301, 2341, 2345, 634, 563, 456, 74, 567, 89, 678, 96, 78, 967, 856, 745, 6345, 6745, 6785, 6789, 67856, 785, 67456, 789, 67896, 7856, 7456, 3452, 3412, 3012, 3456, 7896
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 09 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {2,1,0,9} and {7,8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 67 because 67 is the smallest integer not yet in the sequence such that the elements of the sets {7,8,9,6} and {8,9,6,7} are four consecutive digits;
a(12) is 85 because 85 is the smallest integer not yet in the sequence such that the elements of the sets {9,6,7,8} and {6,7,8,5} are four consecutive digits;
a(13) is 674 because 674 is the smallest integer not yet in the sequence such that the elements of the three sets {7,8,5,6}, {8,5,6,7} and {5,6,7,4} are four consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits and A302173 for sets of three digits.

Programs

  • Python
    a, runLength = [i for i in range(10)], 4
    def helper(s, k, l, a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i), int(str(k)+str(i)), l, a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str, a)))[(1-runLength):], 0, runLength, a))
    print(a) # Dominic McCarty, Feb 03 2025

A302500 Lexicographically first sequence of distinct terms such that any set of five successive digits can be reordered as {d, d+1, d+2, d+3, d+4}, d being the smallest of the five digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 56, 78, 45, 67, 34, 562, 345, 12, 340, 123, 40, 1234, 51, 23, 401, 234, 512, 3401, 2340, 12340, 12345, 62, 3451, 2345, 623, 451, 23401, 23451, 23456, 73, 456, 734, 567, 84, 5673, 4562, 3456, 784, 5678, 95, 678, 956, 789, 56784, 56734, 5623, 4512, 34012, 34512, 34562, 34567, 89
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 09 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {3,2,1,0,9} and {6,7,8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 56 because 56 is the smallest integer not yet in the sequence such that the elements of the sets {6,7,8,9,5} and {7,8,9,5,6} are five consecutive digits;
a(12) is 78 because 78 is the smallest integer not yet in the sequence such that the elements of the sets {8,9,5,6,7} and {9,5,6,7,8} are five consecutive digits;
a(13) is 45 because 45 is the smallest integer not yet in the sequence such that the elements of the sets {5,6,7,8,4} and {6,7,8,4,5} are five consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits, A302173 for sets of three digits and A302499 for sets of four digits.

Programs

  • Python
    a, runLength = [i for i in range(10)], 5
    def helper(s, k, l, a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i), int(str(k)+str(i)), l, a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str, a)))[(1-runLength):], 0, runLength, a))
    print(a) # Dominic McCarty, Feb 03 2025

A302501 Lexicographically first sequence of distinct terms such that any set of six successive digits can be reordered as {d, d+1, d+2, d+3, d+4, d+5}, d being the smallest of the six digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 45, 67, 83, 456, 72, 34, 56, 12, 345, 61, 23, 450, 123, 4501, 234, 50, 1234, 501, 2345, 612, 3450, 12345, 672, 3456, 78, 94, 567, 89, 4567, 834, 5672, 34561, 23450, 123450, 123456, 723, 4561, 23456, 783, 45672, 34567, 894, 5678, 945, 678, 9456, 789, 45678, 94567, 8345, 6723, 45612, 34501, 234501, 234561, 234567, 8945, 6783, 456723, 456123, 45012, 345012
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 09 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {4,3,2,1,0,9} and {5,6,7,8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 45 because 45 is the smallest integer not yet in the sequence such that the elements of the sets {5,6,7,8,9,4} and {6,7,8,9,4,5} are six consecutive digits;
a(12) is 67 because 67 is the smallest integer not yet in the sequence such that the elements of the sets {7,8,9,4,5,6} and {8,9,4,5,6,7} are six consecutive digits;
a(13) is 83 because 83 is the smallest integer not yet in the sequence such that the elements of the sets {9,4,5,6,7,8} and {4,5,6,7,8,3} are six consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits, A302173 (sets of three digits), A302499 (sets of four digits) and A302500 (sets of five digits).

Programs

  • Python
    a, runLength = [i for i in range(10)], 6
    def helper(s, k, l, a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i), int(str(k)+str(i)), l, a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str, a)))[(1-runLength):], 0, runLength, a))
    print(a) # Dominic McCarty, Feb 03 2025

A228327 Start with 0. Successive digits in the sequence must differ by 2. Adjoin the smallest number not yet in the sequence.

Original entry on oeis.org

0, 2, 4, 6, 8, 64, 20, 24, 68, 642, 42, 46, 86, 420, 202, 424, 242, 464, 246, 468, 646, 864, 686, 868, 6420, 2020, 2024, 2420, 2424, 2464, 2468, 6424, 6464, 6468, 6864, 6868, 64202, 4202, 4242, 4246, 4642, 4646, 4686, 8642, 42020, 20202, 42024, 20242, 42420
Offset: 1

Views

Author

N. J. A. Sloane, Aug 24 2013

Keywords

Comments

Is the sequence infinite?

References

  • Eric Angelini, Posting to the Sequence Fans Mailing List, Aug 23 2013.

Crossrefs

Extensions

More terms from Alois P. Heinz, Aug 25 2013

A228328 Start with 1. Successive digits in the sequence must differ by 2. Adjoin the smallest number not yet in the sequence.

Original entry on oeis.org

1, 3, 5, 7, 9, 75, 31, 35, 79, 753, 13, 53, 57, 97, 531, 313, 131, 353, 135, 357, 535, 757, 575, 797, 579, 7531, 3131, 3135, 3531, 3535, 3575, 3579, 7535, 7575, 7579, 7975, 7979, 75313, 1313, 1353, 1357, 975, 31313, 5313, 5353, 5357, 979, 75353, 5753, 5757
Offset: 1

Views

Author

N. J. A. Sloane, Aug 24 2013

Keywords

Comments

Is the sequence infinite?

References

  • Eric Angelini, Posting to the Sequence Fans Mailing List, Aug 23 2013.

Crossrefs

Extensions

More terms from Alois P. Heinz, Aug 25 2013

A302502 Lexicographically first sequence of distinct terms such that any set of seven successive digits can be reordered as {d, d+1, d+2, d+3, d+4, d+5, d+6}, d being the smallest of the seven digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 34, 56, 78, 23, 45, 67, 12, 345, 60, 123, 456, 71, 234, 560, 1234, 567, 82, 3456, 712, 34560, 12345, 601, 2345, 671, 23456, 782, 34567, 89, 345678, 93, 4567, 823, 45671, 234560, 123456, 789, 3456782, 345671, 234567, 893, 45678, 934, 5678, 9345, 678, 93456, 7823, 456712, 345601
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 09 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {5,4,3,2,1,0,9} and {4,5,6,7,8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 34 because 34 is the smallest integer not yet in the sequence such that the elements of the sets {4,5,6,7,8,9,3} and {5,6,7,8,9,3,4} are seven consecutive digits;
a(12) is 56 because 56 is the smallest integer not yet in the sequence such that the elements of the sets {6,7,8,9,3,4,5} and {7,8,9,3,4,5,6} are seven consecutive digits;
a(13) is 78 because 78 is the smallest integer not yet in the sequence such that the elements of the sets {8,9,3,4,5,6,7} and {9,3,4,5,6,7,8} are seven consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits, A302173 (sets of three digits), A302499 (sets of four digits), A302500 (sets of five digits) and A302501 (sets of six digits).

Programs

  • Python
    a, runLength = [i for i in range(10)], 7
    def helper(s, k, l, a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i), int(str(k)+str(i)), l, a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str, a)))[(1-runLength):], 0, runLength, a))
    print(a) # Dominic McCarty, Feb 03 2025

A302503 Lexicographically first sequence of distinct terms such that any set of eight successive digits can be reordered as {d, d+1, d+2, d+3, d+4, d+5, d+6, d+7}, d being the smallest of the eight digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 23, 45, 67, 81, 234, 56, 70, 12, 34, 567, 89, 2345, 678, 92, 345, 6781, 23456, 78, 123, 456, 701, 234567, 812, 3456, 781, 2345670, 1234, 5670, 12345, 670, 123456, 789, 2345678, 923, 4567, 892, 34567, 8123, 45670, 1234567, 8923, 45678, 9234, 5678, 92345, 6789, 23456781, 23456701
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 09 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {6,5,4,3,2,1,0,9} and {3,4,5,6,7,8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 23 because 23 is the smallest integer not yet in the sequence such that the elements of the sets {3,4,5,6,7,8,9,2} and {4,5,6,7,8,9,2,3} are eight consecutive digits;
a(12) is 45 because 45 is the smallest integer not yet in the sequence such that the elements of the sets {5,6,7,8,9,2,3,4} and {6,7,8,9,2,3,4,5} are eight consecutive digits;
a(13) is 67 because 67 is the smallest integer not yet in the sequence such that the elements of the sets {7,8,9,2,3,4,5,6} and {8,9,2,3,4,5,6,7} are eight consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits, A302173 (sets of three digits), A302499 (sets of four digits), A302500 (sets of five digits), A302501 (sets of six digits) and A302502 (sets of seven digits).

Programs

  • Python
    a, runLength = [i for i in range(10)], 8
    def helper(s, k, l, a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i), int(str(k)+str(i)), l, a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str, a)))[(1-runLength):], 0, runLength, a))
    print(a) # Dominic McCarty, Feb 03 2025

A302504 Lexicographically first sequence of distinct terms such that any set of nine successive digits can be reordered as {d, d+1, d+2, d+3, d+4, d+5, d+6, d+7, d+8}, d being the smallest of the nine digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 34, 56, 78, 91, 23, 45, 67, 80, 123, 456, 780, 1234, 567, 89, 12345, 678, 912, 345, 6780, 123456, 789, 1234567, 801, 234, 5678, 9123, 4567, 891, 2345, 6789, 12345678, 91234, 56780, 123456780, 123456789
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 09 2018

Keywords

Comments

As the digit 0 has no predecessor and the digit 9 has no successor here, sets of successive digits like {7,6,5,4,3,2,1,0,9} and {2,3,4,5,6,7,8,9,0} are forbidden.

Examples

			Terms a(1) to a(10) are obvious;
a(11) is 12 because 12 is the smallest integer not yet in the sequence such that the elements of the sets {2,3,4,5,6,7,8,9,1} and {3,4,5,6,7,8,9,1,2} are nine consecutive digits;
a(12) is 34 because 34 is the smallest integer not yet in the sequence such that the elements of the sets {4,5,6,7,8,9,1,2,3} and {5,6,7,8,9,1,2,3,4} are nine consecutive digits;
a(13) is 56 because 56 is the smallest integer not yet in the sequence such that the elements of the sets {6,7,8,9,1,2,3,4,5} and {7,8,9,1,2,3,4,5,6} are nine consecutive digits;
etc.
		

Crossrefs

Cf. A228326 for the same idea with sets of two digits, A302173 (sets of three digits), A302499 (sets of four digits), A302500 (sets of five digits), A302501 (sets of six digits), A302502 (sets of seven digits) and A302503 (sets of eight digits).

Programs

  • Python
    a, runLength = [i for i in range(10)], 9
    def helper(s,k,l,a):
        if k not in a: return k
        return min([helper(s[(2-l):]+str(i),int(str(k)+str(i)),l,a) for i in range(10) if (k!=0 or i!=0) and s.find(str(i))==-1 and (all(d[n]+1==d[n+1] for n in range(l-1)) if (d:=sorted([int((s+str(i))[n]) for n in range(l)])) else False)])
    while len(a)<100: a.append(helper(("".join(map(str,a)))[(1-runLength):],0,runLength,a))
    print(a) # Dominic McCarty, Feb 02 2025
Showing 1-9 of 9 results.