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 31-40 of 72 results. Next

A367356 Length of base-3 Commas sequence when started at n.

Original entry on oeis.org

17, 5, 2, 1, 16, 164, 490, 163, 4, 3, 489, 15, 14, 2, 162, 161, 13, 1472, 488, 1471, 160, 1, 159, 487, 12, 486, 1470, 1469, 11, 158, 157, 1468, 485, 484, 156, 10, 9, 483, 1467, 1466, 8, 155, 154, 1465, 482, 481, 153, 7, 6, 480, 1464, 1463, 5, 41, 152, 40, 1462, 479, 1461, 151, 4, 150, 478, 39, 477, 3, 1460, 2, 38, 149, 37, 1459, 476, 1458, 148, 1, 147, 475, 36, 474, 1457, 1456, 35, 146, 145, 1455, 473, 472, 144, 34, 33, 471, 1454, 1453, 32, 143, 142, 1452, 470, 469
Offset: 1

Views

Author

N. J. A. Sloane, Nov 18 2023

Keywords

Comments

a(n) = 1 for n = 4, 22, 76, ... (the numbers 222...2211 in ternary)
We now know that a(n) is finite for all n.

Examples

			For a(1) = 17, see A367355, which has 17 terms.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy.ntheory.factor_ import digits
    def a(n, b=3): # generator of terms
        an, y, c = n, 1, 0
        while y < b:
            an, y, c = an + b*(an%b), 1, c+1
            while y < b:
                if str(digits(an+y, b)[1]) == str(y):
                    an += y
                    break
                y += 1
        return c
    print([a(n) for n in range(1, 101)]) # 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

A367364 Record high-points in A330128.

Original entry on oeis.org

2137453, 194697747222394, 209534289952018960, 2153441655319779164332, 195152998207833388640389, 192648330068920004741771823742285752
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2023

Keywords

Crossrefs

A367598 is a base-3 analog.

Extensions

a(6) from Michael S. Branicky, Nov 26 2023

A367365 Indices of record high-points in A330128.

Original entry on oeis.org

1, 2, 6, 40, 4000, 20000
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2023

Keywords

Comments

A367599 is a base-3 analog, and includes the terms 2*3, 2*3^2, 2*3^6, which may be analogous to the terms 4*10 and 4*10^3 here.
a(7) <= 80000000000; see linked a-file for indices in A037124 producing increasingly high values of A330128. - Michael S. Branicky, Dec 05 2023

Crossrefs

A367599 is a base-3 analog.

Extensions

a(6) from Michael S. Branicky, Nov 26 2023

A367340 List of distinct (positive) numbers appearing in A367338.

Original entry on oeis.org

11, 12, 22, 23, 24, 33, 34, 35, 36, 44, 45, 46, 47, 48, 55, 56, 57, 58, 59, 61, 66, 67, 68, 69, 71, 72, 73, 77, 78, 79, 81, 82, 83, 84, 85, 88, 89, 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
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2023

Keywords

Comments

This is the list of comma-successors.

Crossrefs

Programs

  • Python
    def cp(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 ok(n): return n > 0 and cp(n) > 0
    print([k for k in range(1, 119) if ok(k)]) # Michael S. Branicky, Dec 18 2023

A367346 Numbers k such that there is more than one possible solution for A367338(k).

Original entry on oeis.org

14, 33, 52, 71, 118, 227, 336, 445, 554, 663, 772, 881, 1918, 2927, 3936, 4945, 5954, 6963, 7972, 8981, 19918, 29927, 39936, 49945, 59954, 69963, 79972, 89981, 199918, 299927, 399936, 499945, 599954, 699963, 799972, 899981, 1999918, 2999927, 3999936, 4999945, 5999954, 6999963, 7999972, 8999981
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2023

Keywords

Comments

The number of solutions is either 0, 1, or 2.
The definition of A121805 instructs us to pick the smallest solution, so there is no ambiguity in the definition of A121805. The present sequence shows that there are very few cases where there is any possible ambiguity.
The sequence begins with the four exceptional terms 14, 33, 52, 71. It also includes all numbers with decimal expansions of the form d 9^i d (9-d), where juxtaposition is concatenation, ^ denotes repeated concatenation of digits, 1 <= d <= 8, and i >= 0, with associated next terms in the commas sequence being either d 9^(i+2) or (d+1) 0^(i+2). It is conjectured that there are no other terms. - Michael S. Branicky, Nov 16 2023
The conjecture is true; see link. - Michael S. Branicky, Nov 21 2023

Examples

			In the commas sequence starting at 14, the next term could be either 59 or 60, because both 14,59 and 14,60 satisfy the "commas" rule (since both 14 + 45 = 59 and 14 + 46 = 60).
		

Crossrefs

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[10^6],fQ[#]&] (* Ivan N. Ianakiev, Dec 16 2023 *)

Extensions

a(30) and beyond from Michael S. Branicky, Nov 16 2023
Second comment edited by N. J. A. Sloane, Nov 20 2023

A367602 Records in A367601.

Original entry on oeis.org

2137453, 194697747222394, 209534289952018960, 2153441655319779164332, 195152998207833388640389, 192648330068920004741771823742285752, 1879472501974027932230497653831908067612145407102, 2071675282852490774827341955075117685752805692835677843166, 20548999112584138590755517725134777010151822745525893951682
Offset: 1

Views

Author

Michael S. Branicky, Dec 06 2023

Keywords

Comments

Is this the same as A367364? - R. J. Mathar, Dec 12 2023

Crossrefs

A166511 Comma numbers: n=concat(a,b) occurs in the sequence S[0]=a, S[1]=b, S[k+1]=S[k]+10*last_digit(S[k-1])+first_digit(S[k]).

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 109, 123, 148, 160, 163, 185, 198, 199, 241, 340, 362, 398, 422, 423, 444, 522, 540, 541, 550, 564, 597, 621, 622, 667, 683, 693, 724, 769, 770, 780, 806, 811, 835, 842, 888, 972, 1023, 1044, 1053, 1054, 1116, 1146, 1177
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Oct 28 2009

Keywords

Comments

A comma number n is the concatenation of numbers a,b (no leading zeros allowed) which occurs ("again") in the comma sequence S = S(a,b) defined by S[0]=a, S[1]=b, S[n+1] = S[n] + 10*last_digit(S[n-1]) + first_digit(S[n]), i.e., add to a given term the number formed by the two digits surrounding the preceding comma.
The sequence S is infinite and straightforward to compute, in contrast to the implicitly defined terms of A121805.
The sequence S(a,b) is strictly increasing, unless a=0 (mod 10) and b=0 (which implies n=0 (mod 100)), in which case all following terms are zero.

Examples

			a(1)=10 is in the sequence, because splitting 10 into (1,0) gives the sequence S(1,0) = 1, 0, 0+10=10, 10+01=11, 11+01=12, 12+11=23,... which contains 10.
a(10)=109 is in the sequence, because splitting 109 into (10,9) gives the sequence S(10,9) = 10, 9, 9+09=18, 18+91=109, 109+81=190,... which contains 109.
108 is not in the sequence since S(10,8) does not contain 108 and it is not allowed to split 108 -> 1,08 -> S(1,08).
		

Crossrefs

See also subsequences A166508, containing A166509, and A166512, containing A166513.

Programs

  • PARI
    {for(n=1,1e4,/*iscomma(n)=*/for(d=1,#Str(n)-1, my( a=n\10^d, b=n%10^d ); b<10^(d-1) & (d>1 || a%10==0) & next; while(n > b=10*(a%10)+b\10^(#Str(b)-1)+a=b,); b>n & next; /*return(1)*/ print1(n", "); break))}

A367614 a(n) is the unique k such that n is the comma-successor 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, -1, 5, -1, -1, -1, -1, 60, 51, 42, 33, -1, 24, 15, 6, -1, -1, -1, 70, 61, 52, -1, 43, 34, 25, 16, 7
Offset: 1

Views

Author

N. J. A. Sloane, Dec 16 2023

Keywords

Comments

If k exists, it could be called the comma-predecessor of n.
a(n) is the unique k such that A367338(k) = n, or -1.
a(n) = -1 iff n is in A367600.

Crossrefs

Programs

  • Python
    def a(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
    print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Dec 16 2023

A367465 Lexicographically earliest infinite sequence of distinct positive numbers such that, when all terms are written as a product of their prime factors with specific primes as the first and last factor, the product of the two primes adjacent to the commas between the terms equals the magnitude of the difference between the terms.

Original entry on oeis.org

2, 6, 12, 16, 20, 10, 14, 28, 24, 15, 30, 26, 52, 48, 39, 78, 72, 63, 42, 21, 70, 35, 60, 45, 36, 27, 18, 22, 44, 40, 50, 46, 92, 88, 66, 33, 154, 77, 126, 105, 80, 76, 38, 34, 68, 102, 51, 340, 255, 170, 85, 110, 55, 176, 172, 86, 82, 164, 160, 135, 120, 111, 222, 148, 74, 1443, 962, 481, 312
Offset: 1

Views

Author

Scott R. Shannon, Nov 18 2023

Keywords

Comments

The sequence is a prime factorization version of the 'Commas sequence', A121805. Although for many terms a following number can be chosen that is smaller than the term given in the sequence and meets the term difference requirements, all such choices ultimately lead to the sequence halting as a number is eventually reached for which no unused next number exists. See the examples for the specific factorization order for the terms. The sequence is infinite as at any time an even number is encountered that is larger than any previous term, one could choose all subsequent terms to be a(n) = a(n-1) + 2*Gpf(a(n-1)), where Gpf(a(n-1)) is the greatest prime factor of a(n-1) and where that prime is placed last in the factorization ordering while 2 is placed first. This guarantees an infinite sequence that follows the required difference rule. See A367504.
One can show that no prime p, other than a(1) = 2, can be a term as its preceding term must be p*(p+1), but the only term following p must also be p*(p+1), which has already appeared. Prime powers can appear but are rare; in the first 2500 terms the prime powers are a(4) = 16, a(26) = 27, a(694) = 729, a(1425) = 1331, a(2251) = 2197. The later four are all odd cubes. In the same range the only fixed points are 100 and 1899, although more likely exist as the terms appear to spike up to large values only to decrease again to below the line a(n) = n.
See A367504 for the conjectured sequence when an additional requirement is added that the primes in the factorization of each term must be in order.

Examples

			The prime factorization of the terms, with the required prime factors in the first and last position, begins: 2, 2*3, 2*3*2, 2*2*2*2, 2*5*2, 5*2, 2*7, 2*7*2, 2*2*2*3, 3*5, 3*5*2, 2*13, 2*13*2, 2*2*2*2*3, 3*13, 2*13*3, 2*2*2*3*3, 3*3*7, 3*2*7, 3*7, 7*2*5, 7*5, 5*2*2*3, 5*3*3, 3*2*2*3, 3*3*3, 3*3*2, 2*11, 2*11*2, 2*2*5*2, 5*5*2, 2*23, 2*23*2,... .
a(4) = 16 as a(3) = 12 which is written as 2*3*2, and 16 = 2*2*2*2, so the two primes adjacent to the term separating comma are 2 and 2, and 2*2 = 4, which equals |16 - 12|. Note that after a(3) = 12 there are five possible numbers that would meet the difference requirement : 3, 8, 16, 18, 21. The first is a prime so can be discarded, while choosing 8 forces the following number to be 4, which then has no available choices so would halt the sequence. This leaves 16 as the smallest choice.
		

Crossrefs

Previous Showing 31-40 of 72 results. Next