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

A367338 Comma-successor to n: second term of commas sequence if initial term is n, or -1 if there is no second term.

Original entry on oeis.org

12, 24, 36, 48, 61, 73, 85, 97, 100, 11, 23, 35, 47, 59, 72, 84, 96, -1, 110, 22, 34, 46, 58, 71, 83, 95, -1, 109, 120, 33, 45, 57, 69, 82, 94, -1, 108, 119, 130, 44, 56, 68, 81, 93, -1, 107, 118, 129, 140, 55, 67, 79, 92, -1, 106, 117, 128, 139, 150, 66, 78, 91, -1, 105, 116
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2023

Keywords

Comments

Construct the commas sequence as in A121805, but take the first term to be n. Then a(n), the comma-successor to n, is the second term, or -1 if no second term exists.
More generally, we define a comma-child of n to be any number m with the property that m-n = 10*x+y, where x is the least significant digit of n and y is the most significant digit of m.
A positive number can have 0, 1, or 2 comma-children. In accordance with the Law of Primogeniture, the first-born child (i.e. the smallest), if there is one, is the comma-successor.
Comment from N. J. A. Sloane, Nov 19 2023: (Start)
The following is a proof of a slight modification of a conjecture made by Ivan N. Ianakiev in A367341.
The Comma-Successor Theorem.
Let D(b) denote the set of numbers k which have no comma-successor in base b ("comma-successor" is the base-b generalization of the rule that defines A121805). If a commas sequence reaches a number in D(b) it will end there.
Then D(b) consists precisely of the numbers which when written in base b have the form
cc...cxy = (b^i-1)*b^2/(b-1) + b*x + y,
with i >= 0 copies of c = b-1, where x and y are in the range [1..b-2] and satisfy x+y = b-1. .... (*)
For b = 10 the numbers D(10) are listed in A367341.
For an outline of the proof, see the attached text-file.
Note that in base b = 2, no values of x satisfying (*) exist, and the theorem asserts that D(2) is empty. In fact it is easy to check directly that every commas sequence in base 2 is infinite. If the initial term is 0 or 1 mod 4 then the sequence will merge with A042948, and if the initial term is 2 or 3 mod 4 then the sequence will merge with A042964.
(End)

Examples

			a(1) = A121803(2) = 12,
a(2) = A139284(2) = 24,
a(3) = 36, since the full commas sequence starting with 3 is [3, 36] (which also implies a(36) = -1),
a(4) = A366492(2) = 48, and so on.
60 is the first number that is a comma-child (a member of A367312) but is missing from the present sequence (it is a comma-child but not a comma-successor, since it loses out to 59).
		

Crossrefs

A367346 lists those n for which there is more than one choice for the second term.
A367612 lists the numbers that are comma-children of some number k.

Programs

  • Maple
    Ldigit:=proc(n) local v; v:=convert(n, base, 10); v[-1]; end;
    A367338 := proc(n) local f,i,d;
    f := (n mod 10);
    d:=10*f;
    for i from 1 to 9 do
    d := d+1;
    if Ldigit(n+d) = i then return(n+d); fi;
    od:
    return(-1);
    end;
    for n from 1 to 50 do lprint(n, A367338(n)); od: # N. J. A. Sloane, Dec 06 2023
  • Mathematica
    a[n_] := a[n] = Module[{l = n, y = 1, d}, While[y < 10, l = l + 10*(Mod[l, 10]); y = 1; While[y < 10, d = IntegerDigits[l + y][[1]]; If[d == y, l = l + y; Break[];]; y++;]; If[y < 10, Return[l]];]; Return[-1];];
    Table[a[n], {n, 1, 65}] (* Robert P. P. McKone, Dec 18 2023 *)
  • Python
    from itertools import islice
    def a(n):
        an, y = n, 1
        while y < 10:
            an, y = an + 10*(an%10), 1
            while y < 10:
                if str(an+y)[0] == str(y):
                    an += y
                    break
                y += 1
            if y < 10:
                return an
        return -1
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Nov 15 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

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

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
Showing 1-5 of 5 results.