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.

Previous Showing 11-20 of 22 results. Next

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

A367617 a(n) is the most remote positive ancestor of n in the comma-child graph.

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, 14, 5, 62, 63, 64, 65, 14, 51, 42, 30, 30, 2, 15, 6, 74, 75
Offset: 1

Views

Author

Keywords

Comments

Like A367366 but allows ancestors that are not comma-predecessors. More specifically, A367366(n) is the most remote positive ancestor of n in the comma-successor graph. See A367338 for definitions.
This sequence first differs from A367366 at n = 60.

Examples

			a(60) = a(66) = 14, since 66 is a comma-child of 60, and 60 is a comma-child of 14, and 14 is not the comma-child of any positive number. In other words, A367616(A367616(66)) = A367616(60) = 14, and A367616(14) = -1.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

-1, -1, -1, 3, 1, 1, -1, 6, 2, 9, 7, 5, 12, 10, 8, 15, 13, 13, 11, 18, 16, 14, 21, 19, 17, 24, 20, 27, 25, 23, 30, 28, 26, 33, 31, 29, 36, 34, 32, 39, 37, 35, 42, 40, 38, 45, 43, 41, 48, 46, 44, 51, 49, 49, 47, 54, 52, 50, 57, 55, 53, 60, 58, 56, 63, 61, 59, 66, 64, 62, 69, 67, 65, 72, 70, 68, 75, 73, 71, 78, 74, 81, 79, 77, 84, 82
Offset: 1

Views

Author

Keywords

Comments

Analogous to A367616, but the calculations are done in base 3.
See A367338 for definitions of comma-child.
May also be called the "comma-parent" of n since n is the comma-child of a(n).

Crossrefs

Programs

  • Python
    from functools import cache
    from sympy.ntheory.factor_ import digits
    def a(n, base=3):
        y = digits(n, base)[1]
        x = (n-y)%base
        k = n - y - base*x
        return k if k > 0 else -1
    print([a(n) for n in range(1, 88)])

Formula

a(n) = n - y - b*((n-y) mod b) where b is the base and y is the first digit of a(n); it is said to exist if a(n) > 0, else undefined (here, -1).

A367619 a(n) is the most remote positive ancestor of n in the comma-child graph in base 3.

Original entry on oeis.org

1, 2, 3, 3, 1, 1, 7, 1, 2, 2, 7, 1, 1, 2, 1, 1, 1, 1, 7, 1, 1, 2, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 7
Offset: 1

Views

Author

Keywords

Comments

Analogous to A367617, but the calculations are done in base 3.
See A367338 for definitions of comma-child.
The sequence consists entirely of terms in {1, 2, 3, 7}. In particular, two terms, a(3) = a(4) = 3; five terms, a(2,9,10,14,22) = 2; and 490 terms are 7, ending with a(2182). All other terms a(k) are 1, since a(2183..2190) = 1 and 1 <= p(n) - n <= b^2 - 1 (= 8 for base b = 3).

Crossrefs

Programs

  • Python
    from functools import cache
    from sympy.ntheory.factor_ import digits
    def comma_parent(n, base=3): # A367618(n)
        y = digits(n, base)[1]
        x = (n-y)%base
        k = n - y - base*x
        return k if k > 0 else -1
    @cache
    def a(n):
        cp = comma_parent(n)
        if cp <= 0: return n
        return a(cp)
    print([a(n) for n in range(1, 88)])

Formula

a(n) is defined as n if A367618(n) = -1, else A367618(A367618(n)).

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

A367612 Numbers that are the comma-child of exactly one positive number.

Original entry on oeis.org

11, 12, 22, 23, 24, 33, 34, 35, 36, 44, 45, 46, 47, 48, 55, 56, 57, 58, 59, 60, 61, 66, 67, 68, 69, 70, 71, 72, 73, 77, 78, 79, 80, 81, 82, 83, 84, 85, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122
Offset: 1

Views

Author

Keywords

Comments

This is the complement of A367611.
See A367338 for definition of comma-child.
May also be called numbers that have a positive comma-predecessor.

Crossrefs

Programs

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

A367620 The lexicographically earliest infinite sequence of positive numbers in which each term is a comma-child of the previous term.

Original entry on oeis.org

20, 22, 46, 107, 178, 260, 262, 284, 327, 401, 415, 469, 564, 610, 616, 682, 709, 807, 885, 944, 993, 1024, 1065, 1116, 1177, 1248, 1329, 1420, 1421, 1432, 1453, 1484, 1525, 1576, 1637, 1708, 1789, 1880, 1881, 1892, 1913, 1944, 1985, 2037, 2109, 2201, 2213, 2245, 2297, 2369, 2461, 2473, 2505, 2557, 2629, 2721, 2733, 2765
Offset: 1

Views

Author

Keywords

Comments

Discovered by David W. Wilson in 2007 (see 2016 Angelini link).
The first choice point occurs for the term after a(412987860) = 19999999918, which has two comma-children.
We do not know which choice to take at that point. We do know by König's Infinity Lemma that one or both forks will extend to infinity. The definition of this sequence requires that we choose the smallest fork that has an infinite continuation.
Update, Dec 22 2023: We now know that the start of this sequence is one of four candidates (all other possible starts having terminated). The shortest of the four possible starts has length
8278670191169895553395510925614764265575448369172463113087634743486440833078554
In other words, we know that there are only four possibilities for the initial prefix of that length.

Crossrefs

A367622 Number of comma-children of n in base 10.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 2023

Keywords

Crossrefs

Cf. A121805, A367338 (definition), A367341 (0's), A367346 (2's).

Programs

  • Mathematica
    f[n_]:=Module[{k=n+10*Last[IntegerDigits[n]]+Range[9]},Length[Select[k,#-n==
    FromDigits[{Last[IntegerDigits[n]],First[IntegerDigits[#]]}]&]]]; f/@Range[108] (* Ivan N. Ianakiev, Dec 24 2023 *)
  • Python
    def a(n):
        x = 10*(n%10)
        return len([y for y in range(1, 10) if str(n+x+y)[0] == str(y)])
    print([a(n) for n in range(1, 95)]) # Michael S. Branicky, Dec 23 2023

A367611 Numbers that are not the comma-child of any positive 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, 62, 63, 64, 65, 74, 75, 76, 86, 87, 98
Offset: 1

Views

Author

Keywords

Comments

A subsequence of A367600.
This 50-term sequence was found by David W. Wilson in 2007. See the Eric Angelini link.
See A367338 for definition of comma-child.

Crossrefs

A367612 gives the complement.

Programs

  • Python
    def ok(n): y = int(str(n)[0]); x = (n-y)%10; return n - y - 10*x < 1
    print([k for k in range(1, 99) if ok(k)]) # Michael S. Branicky, Dec 15 2023

A367613 Numbers with exactly one comma-child.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83
Offset: 1

Views

Author

N. J. A. Sloane, Dec 15 2023

Keywords

Comments

Complement of union of A367341 and A367346.
See A367338 for definition of comma-child.

Crossrefs

Cf. A121895, A367341 (numbers with no comma-children), A367346 (numbers with two comma-children).

Programs

  • Mathematica
    fQ[n_]:=Module[{k=n+10*Last[IntegerDigits[n]]+Range[9]},Length[Select[k,#-n==FromDigits[{Last[IntegerDigits[n]],First[IntegerDigits[#]]}]&]]]==1;
    Select[Range[83],fQ[#]&] (* Ivan N. Ianakiev, Dec 16 2023 *)
  • Python
    def ok(n):
        m = n + 10*(n%10)
        return len([m+y for y in range(1, 10) if int(str(m+y)[0]) == y]) == 1
    print([k for k in range(1, 100) if ok(k)]) # Michael S. Branicky, Dec 28 2023
Previous Showing 11-20 of 22 results. Next