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.

A098953 Slowest increasing sequence where each number is such that at least one pair of adjacent digits are consecutive, the first of the pair being the smaller.

Original entry on oeis.org

12, 23, 34, 45, 56, 67, 78, 89, 101, 112, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 134, 145, 156, 167, 178, 189, 201, 212, 223, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 245, 256, 267, 278, 289, 301, 312, 323, 334, 340, 341, 342, 343, 344, 345
Offset: 1

Views

Author

Eric Angelini, Oct 21 2004

Keywords

Comments

Corrected by Zak Seidov, Apr 15 2007

Crossrefs

A similar sequence: A082927

Programs

  • Python
    from itertools import count, islice
    def cond(n):
        d = list(map(int, str(n)))
        return any(d[i+1] == d[i]+1 for i in range(len(d)-1))
    def agen():
        yield from filter(cond, count(1))
    print(list(islice(agen(), 54))) # Michael S. Branicky, Dec 23 2021

Extensions

a(51) and beyond from Michael S. Branicky, Dec 23 2021

A352927 Numbers whose digits are nonzero, consecutive, and all increasing or all decreasing.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 123, 234, 321, 345, 432, 456, 543, 567, 654, 678, 765, 789, 876, 987, 1234, 2345, 3456, 4321, 4567, 5432, 5678, 6543, 6789, 7654, 8765, 9876, 12345, 23456, 34567, 45678, 54321, 56789, 65432, 76543, 87654, 98765, 123456, 234567, 345678
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2022, following a suggestion from Ralph Sieber

Keywords

Comments

There are 81 terms, corresponding to numbers that start with i and end with j, for 1 <= i <= 9, 1 <= j <= 9. - Michael S. Branicky, May 01 2022

Crossrefs

Programs

  • Mathematica
    Join[Range[9],Select[Range[350000],DigitCount[#,10,0]==0&&(Union[Differences[IntegerDigits[ #]]]=={1}||Union[Differences[IntegerDigits[#]]]=={-1})&]] (* Harvey P. Dale, Aug 13 2023 *)
  • Python
    def sgn(n): return 1 if n >= 0 else -1
    def afull(): return sorted(int("".join(map(str, range(i, j+sgn(j-i), sgn(j-i))))) for i in range(1, 10) for j in range(1, 10))
    print(afull()) # Michael S. Branicky, May 01 2022

A358054 Starting with 0, smallest integer not yet in the sequence such that no two neighboring digits differ by 1.

Original entry on oeis.org

0, 2, 4, 1, 3, 5, 7, 9, 6, 8, 11, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 40, 41, 42, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, 74, 75, 77, 79, 90, 80
Offset: 0

Views

Author

Gavin Lupo and Eric Angelini, Oct 28 2022

Keywords

Comments

Integers such as 10, 12, 21, 76, 6792, and 10744 (see A082927) will not appear in the sequence as they contain adjacent digits that differ by 1. Some integers may be disallowed only temporarily; for example, if a(n) = 79, and all nonnegative integers < 79 are already in the sequence, then a(n+1) = 90, because a(n+1) must not start with an 8, as it would differ by 1 from the digit "9" in 79. Now, a(n+2) can equal 80.

Examples

			a(0) = 0.
a(1) = 2. Cannot be 1. Smallest integer that can be placed = 2.
a(2) = 4. Cannot be 1 or 3. Smallest integer that can be placed = 4.
a(3) = 1. Cannot be 3 or 5. Smallest integer that can be placed = 1.
...
(Nonnegative integers < 86, disregarding invalid integers, have already appeared.)
a(74) = 86.
a(75) = 88. Cannot be 87, as it contains adjacent digits that differ by 1. Smallest integer that can be placed = 88.
a(76) = 111. Cannot be 89, 90->99 (9 and 8 differ by 1), or 100->110 (1 and 0 are adjacent and differ by 1). Smallest integer that can be placed = 111.
		

Crossrefs

Programs

A098954 Slowest increasing sequence where each number is such that at least one pair of adjacent digits are consecutive, the second one being the smallest.

Original entry on oeis.org

10, 21, 32, 43, 54, 65, 76, 87, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 121, 132, 143, 154, 165, 176, 187, 198, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 221, 232, 243, 254, 265, 276, 287, 298, 310, 320, 321, 322, 323, 324, 325, 326
Offset: 1

Views

Author

Eric Angelini, Oct 21 2004

Keywords

Examples

			132 shows 32 and thus belongs to the sequence; 123 doesn't fit because the smallest digit (2) has to come in second.
		

Crossrefs

Close to this sequence: A082927
Showing 1-4 of 4 results.