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

A367354 Analog of A121805, but starting with 10.

Original entry on oeis.org

10, 11, 23, 58, 139, 231, 243, 275, 328, 412, 436, 501, 516, 581, 596, 662, 688, 775, 833, 871, 889, 988, 1069, 1160, 1161, 1172, 1193, 1224, 1265, 1316, 1377, 1448, 1529, 1620, 1621, 1632, 1653, 1684, 1725, 1776, 1837, 1908, 1989, 2081, 2093, 2125, 2177, 2249, 2341, 2353
Offset: 1

Views

Author

N. J. A. Sloane, Nov 17 2023

Keywords

Comments

Contains 20573 terms, the last of which is 999936.

Crossrefs

Comma sequences in base 10, starting with 1, 2, 4, 5, 6, 7, 8, 9, 10 are A121805, A139284, A366492, A367337, A367350, A367351, A367352, A367353, A367354. Starting with 3 is trivial, and those starting with 11, 12, 13 are essentially duplicates.

Programs

  • Mathematica
    a[1] = b = 10; m = b - 1; a[n_] := a[n] = For[r = Mod[a[n - 1], b]; y = 0, y <= m, y++, If[y == IntegerDigits[#, b][[1]], Return[#]] &[a[n - 1] + b r + y]]; Array[a, 50] (* Michael De Vlieger, Nov 18 2023, after Jean-François Alcover at A121805 *)
  • Python
    from itertools import islice
    def agen(start=10): # generator of terms
        an, y = start, 1
        while y < 10:
            yield an
            an, y = an + 10*(an%10), 1
            while y < 10:
                if str(an+y)[0] == str(y):
                    an += y
                    break
                y += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Nov 18 2023

A367339 a(n) = A367338(n) - n, or -1 if A367338(n) = -1.

Original entry on oeis.org

11, 22, 33, 44, 56, 67, 78, 89, 91, 1, 12, 23, 34, 45, 57, 68, 79, -1, 91, 2, 13, 24, 35, 47, 58, 69, -1, 81, 91, 3, 14, 25, 36, 48, 59, -1, 71, 81, 91, 4, 15, 26, 38, 49, -1, 61, 71, 81, 91, 5, 16, 27, 39, -1, 51, 61, 71, 81, 91, 6, 17, 29, -1, 41, 51, 61, 71, 81, 91, 7, 18, -1
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2023

Keywords

Comments

Construct the commas sequence as in A121805, but take first term to be n. Then a(n) is the two digit number surrounding the first comma, or -1 if there is no second term (and hence no comma).
a(n) (unless it -1) is called the comma-number of n.
As in A121805, if the term before the comma ends in 0, that 0 is ignored and the comma number is a single-digit number.

Examples

			For n = 1, A121805 begins 1, 12, 35, 94, ..., and the first comma appears as 1,1, so a(1) = 11.
For n = 2, A139284 begins 2, 24, 71, 89, ... and the first comma appears as 2,2, so a(2) = 22.
For n = 36, the commas sequence starting at 36 is simply the one-term sequence [36], no second term exists, there is no comma, and so a(36) = -1.
		

Crossrefs

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

A347353 Lexicographically earliest sequence of distinct positive terms such that the rightmost digit of a(n) concatenated with the leftmost digit of a(n+1) form an integer that is the sum of the digits of a(n) and a(n+1).

Original entry on oeis.org

1, 19, 1899999999, 29, 1799999999, 119, 1889999999, 128, 169999999, 1299, 178999999, 1389, 179899999, 1398, 15999999, 13999, 16899999, 14899, 16989999, 14989, 16998999, 14998, 1499999, 149999, 1589999, 158999, 1598999, 159899, 1599899, 159989, 1599989, 159998, 139999, 1599999, 148999
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Aug 28 2021

Keywords

Comments

In other words, the two digits squeezing a comma form the sum of the digits of the two terms squeezing the comma. This sequence is finite and has 1309 terms, the last one being 191.

Examples

			a(1), a(2) = 1, 19 and 11 is 1 + (1+9);
a(2), a(3) = 19, 1899999999 and 91 is (1+9) + (1+8+9+9+9+9+9+9+9+9);
a(3), a(4) = 1899999999, 29 and 92 is (1+8+9+9+9+9+9+9+9+9) + (9+2);
a(4), a(5) = 29, 1799999999 and 91 is (2+9) + (1+7+9+9+9+9+9+9+9+9); etc.
		

Crossrefs

Programs

  • Mathematica
    a[1]=1;a[n_]:=a[n]=(t=1;While[!IntegerQ[m=Min@Union@Flatten@Table[l=FromDigits[{Last[s=IntegerDigits@a[n-1]],k}]-Total@s;Complement[FromDigits/@Flatten[Permutations/@Select[Sort/@IntegerPartitions[l,t,Range@9],First@#==k&],1],Array[a,n-1]],{k,9}]],t++];m);Array[a,35] (* Giorgos Kalogeropoulos, May 05 2022 *)
Previous Showing 11-14 of 14 results.