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.

A367600 Numbers that are not the comma-successor of any number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 25, 26, 27, 28, 29, 30, 31, 32, 37, 38, 39, 40, 41, 42, 43, 49, 50, 51, 52, 53, 54, 60, 62, 63, 64, 65, 70, 74, 75, 76, 80, 86, 87, 90, 98, 200, 300, 400, 500, 600, 700, 800, 900, 2000, 3000, 4000, 5000, 6000, 7000
Offset: 1

Views

Author

Giovanni Resta, Nov 23 2023

Keywords

Comments

These are the positive integers that do not appear in A367338.
All terms > 98 are of the form c*10^i for i >= 2 and 2 <= c <= 9; see proof in links. - Michael S. Branicky, Nov 28 2023

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A367338(n):
        nn = n + 10*(n%10)
        return next((nn+y for y in range(1, 10) if str(nn+y)[0] == str(y)), -1)
    def agen():
        A367338_set = set()
        for n in count(1):
            A367338_set.add(A367338(n))
            if n not in A367338_set:
                yield n
            # A367338_set.discard(n-100) # uncomment if memory is an issue
    print(list(islice(agen(), 86))) # Michael S. Branicky, Nov 28 2023

A367616 a(n) is the unique k such that n is a comma-child of k, or -1 if k does not exist.

Original entry on oeis.org

-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, 30, 21, 12, 3, -1, -1, -1, -1, -1, -1, -1, 40, 31, 22, 13, 4, -1, -1, -1, -1, -1, -1, 50, 41, 32, 23, 14, 14, 5, -1, -1, -1, -1, 60, 51, 42, 33, 33, 24, 15, 6, -1, -1, -1, 70, 61, 52, 52, 43, 34, 25, 16, 7
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2023

Keywords

Comments

Similar to A367614, but here we give the k such that n is a comma-child of k, whereas in A367614 n has to be a comma-successor of k. See A367338 for definitions.
The first difference between A367614 and the present sequence arises because 14 has one comma-successor, 59, but has two comma-children, 59 and 60. So A367614(59) = 14, A367614(60) = -1, while in the present sequence we have a(59) = a(60) = 14.
There are similar differences at n = 69 and 70, because both are comma-children of 33, and at many other places.

Crossrefs

Programs

  • Python
    def a(n):
        y = int(str(n)[0])
        x = (n-y)%10
        k = n - y - 10*x
        return k if k > 0 else -1
    print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Dec 18 2023

A367366 a(n) = smallest k such that the commas sequence (cf. A121805) with initial term k contains n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 1, 13, 14, 15, 16, 17, 18, 19, 20, 21, 20, 10, 2, 25, 26, 27, 28, 29, 30, 31, 32, 30, 21, 1, 3, 37, 38, 39, 40, 41, 42, 43, 40, 31, 20, 13, 4, 49, 50, 51, 52, 53, 54, 50, 41, 32, 10, 14, 60, 5, 62, 63, 64, 65, 60, 51, 42, 30, 70, 2, 15, 6, 74, 75
Offset: 1

Views

Author

N. J. A. Sloane, Dec 05 2023

Keywords

Comments

Every k >= 1 appears in this sequence exactly A330128(k) times. So there are 2137453 1's, 194697747222394 2's, 2 3's, 209534289952018960 6's, and so on.
a(n) is the most remote ancestor of n in the comma-successor graph.

Examples

			All terms n in A121805 have a(n) = 1, all n in A139284 have a(n) = 2, all n in A366492 have a(n) = 4, and so on.
		

Crossrefs

Programs

  • Python
    def comma_predecessor(n): # A367614(n)
        y = int(str(n)[0])
        x = (n-y)%10
        k = n - y - 10*x
        kk = k + 10*x + y-1
        return k if k > 0 and int(str(kk)[0]) != y-1 else -1
    def a(n):
        an = n
        while (cp:=comma_predecessor(an)) > 0: an = cp
        return an
    print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Dec 18 2023
Showing 1-3 of 3 results.