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.

A367349 List of numbers in the range 1 to 99 missing from A366487.

Original entry on oeis.org

4, 10, 15, 20, 24, 30, 40, 44, 50, 60, 64, 65, 70, 80, 84, 90
Offset: 1

Views

Author

N. J. A. Sloane, Nov 17 2023

Keywords

Comments

These numbers do not occur as differences between successive terms in A121805.

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = For[r = Mod[a[n - 1], 10]; y = 0, y <= 9, y++, If[y == IntegerDigits[#][[1]], Return[#]] &[a[n - 1] + 10 r + y]]; Complement[Range[99], Union@ Differences@ Array[a, 10^6]] (* Michael De Vlieger, Nov 18 2023, after Jean-François Alcover at A121805 *)

A368782 Comma transform of A366487.

Original entry on oeis.org

12, 35, 94, 15, 16, 28, 31, 34, 37, 41, 45, 55, 55, 55, 55, 61, 67, 74, 71, 89, 98, 97, 18, 19, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 11, 11, 12, 13, 14, 15, 16, 17, 18, 22, 22, 24, 26, 28, 22, 22, 24, 26, 28, 22, 22, 24, 26, 28, 22, 22, 24, 26, 28, 22, 22
Offset: 1

Views

Author

Michael S. Branicky, Jan 05 2024

Keywords

Comments

See A367360 for further information.
Let the comma sequence A121805 be known as S or C0.
A366487, the first differences of A121805, is the same as the comma transform of A121805; call it C1.
This sequence is C2 = C(C(S)), the comma transform C iterated twice.
C4 = C2, C5 = C2, ... once the first term (and the last term if the sequence is finite) are removed from the lower iterates of C.
Theorem: C^{i+2}(S) = C^i(S) for i>=2 in general and for i>=0 when all terms of S have two digits and no least significant digit is zero. See link for proof.
Remark. The lexicographically earliest sequence S with C(S) = S is A010850, all 11's.
The sequence contains 2137451 terms, with a(2137451) = 96. The next term does not exist.

Crossrefs

Programs

  • Python
    from itertools import islice, pairwise
    def S(): # generator of comma sequence
        an = 1
        while True:
            yield an
            an += 10*(an%10)
            children = [an+y for y in range(1, 10) if str(an+y)[0] == str(y)]
            if not children: break
            an = children[0]
    def C(g): # generator of comma transform of sequence passed as a generator
        yield from (10*(t%10) + int(str(u)[0]) for t, u in pairwise(g))
    def agen(): return C(C(S()))
    print(list(islice(agen(), 70))) # Michael S. Branicky, Jan 05 2024

A121805 The "comma sequence": the lexicographically earliest sequence of positive numbers with the property that the sequence formed by the pairs of digits adjacent to the commas between the terms is the same as the sequence of successive differences between the terms.

Original entry on oeis.org

1, 12, 35, 94, 135, 186, 248, 331, 344, 387, 461, 475, 530, 535, 590, 595, 651, 667, 744, 791, 809, 908, 997, 1068, 1149, 1240, 1241, 1252, 1273, 1304, 1345, 1396, 1457, 1528, 1609, 1700, 1701, 1712, 1733, 1764, 1805, 1856, 1917, 1988, 2070
Offset: 1

Views

Author

Eric Angelini, Dec 11 2006

Keywords

Comments

An equivalent, but more formal definition, is: a(1) = 1; for n > 1, let x be the least significant digit of a(n-1); then a(n) = a(n-1) + x*10 + y where y is the most significant digit of a(n) and is the smallest such y, if such a y exists. If no such y exists, stop.
The sequence contains exactly 2137453 terms, with a(2137453)=99999945. The next term does not exist. - W. Edwin Clark, Dec 11 2006
It is remarkable that the sequence persists for so long. - N. J. A. Sloane, Dec 15 2006
The similar sequence A139284, which starts at a(1)=2, persists even longer, ending at a(194697747222394) = 9999999999999918. - Giovanni Resta, Nov 30 2019
Conjecture: This sequence is finite, for any initial term. - N. J. A. Sloane, Nov 14 2023
The base 2 analog (suggested by William Cheswick) is 1, 4, 5, 8, 9, 12, 13, ..., (see A042948) with successive differences 3, 1, 3, 1, ... (repeat). - N. J. A. Sloane, Nov 15 2023
Does not satisfy Benford's Law. - Michael S. Branicky, Nov 16 2023
Using the notion of "comma transform" of a sequence, as defined in A367360, this is the lexicographically earliest sequence of positive integers with the property that its first differences and comma transform coincide. - N. J. A. Sloane, Nov 23 2023

Examples

			Replace each comma in the original sequence by the pair of digits adjacent to the comma; the result is the sequence of first differences between the terms of the sequence:
Sequence:   1, 12, 35, 94, 135, 186, 248, 331, 344, 387, 461, 475, ...
Differences: 11, 23, 59, 41 , 51 , 62 , 83 , 13 , 43 , 74 , 14 , ...
To illustrate the formula in the comment: a(6) = 186 and a(7) = 248 = 186 + 62.
		

References

  • Eric Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.

Crossrefs

See A366487 and A367349 for first differences.
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.
Cf. A330128, A330129, A367338 (comma-successor), A367360.
See also A260261, A042948.

Programs

  • Maple
    digits:=n->ListTools:-Reverse(convert(n,base,10)):
    nextK:=proc(K) local i,L; for i from 0 to 9 do L:=K+digits(K)[ -1]*10+i; if i = digits(L)[1] then return L; fi; od; FAIL; end:
    A121805:=proc(n) option remember: if n = 1 then return 1; fi; return nextK(A121805(n-1)); end: # W. Edwin Clark
  • Mathematica
    a[1] = 1; a[n_] := a[n] = For[x=Mod[a[n-1], 10]; y=0, y <= 9, y++, an = a[n-1] + 10*x + y; If[y == IntegerDigits[an][[1]], Return[an]]]; Array[a, 45] (* Jean-François Alcover, Nov 25 2014 *)
  • PARI
    a=1; for(n=1,1000, print1(a", "); a+=a%10*10; for(k=1, 9, digits(a+k)[1]==k&&(a+=k)&&next(2)); error("blocked at a("n")=",a-a%10*10)) \\ M. F. Hasler, Jul 21 2015
    
  • Python
    from itertools import islice
    def agen(): # generator of terms
        an, y = 1, 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(), 45))) # Michael S. Branicky, Apr 08 2022
  • R
    A121805 <- data.frame(n=seq(from=1,to=2137453),a=integer(2137453)); A121805$a[1]=1; for (i in seq(from=2,to=2137453)){LSD=A121805$a[i-1] %% 10; k = 1; while (k != as.integer(substring(A121805$a[i-1]+LSD*10+k,1,1))){k = k+1; if(k>9) break} A121805$a[i]=A121805$a[i-1]+LSD*10+k} # Simon Demers, Oct 19 2017
    

Extensions

More terms from Zak Seidov, Dec 11 2006
Edited by N. J. A. Sloane, Sep 17 2023
Changed name from "commas sequence" to "comma sequence". - N. J. A. Sloane, Dec 20 2023

A367358 Indices k at which either the leading digit or the length of A121805(k) changes.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 17, 19, 21, 22, 24, 45, 69, 90, 107, 127, 145, 164, 185, 204, 422, 614, 822, 1007, 1174, 1392, 1585, 1757, 1943, 4115, 6039, 8123, 9974, 11641, 13814, 15738, 17822, 19673, 41413, 60643, 81477, 99995, 114281, 132138, 151369, 172201, 190720, 408111, 646206, 854539, 1039724, 1373058, 1551630, 1743937, 1952271
Offset: 1

Views

Author

N. J. A. Sloane, Nov 21 2023

Keywords

Crossrefs

Programs

  • Python
    def agen(): # generator of terms
        n, an, y, prev_lead, prev_length = 1, 1, 1, None, None
        while y < 10:
            san = str(an)
            lead, length = san[0], len(san)
            if lead != prev_lead or length != prev_length:
                yield n
            an, y = an + 10*(an%10), 1
            while y < 10:
                if str(an+y)[0] == str(y):
                    an += y
                    break
                y += 1
            n, prev_lead, prev_length = n+1, lead, length
    print(list(agen())) # Michael S. Branicky, Nov 22 2023

Extensions

More terms from Michael S. Branicky, Nov 22 2023

A367359 Value of A121805(k) for k = A367358(n).

Original entry on oeis.org

1, 12, 35, 94, 135, 248, 331, 461, 530, 651, 744, 809, 908, 1068, 2070, 3039, 4093, 5012, 6013, 7042, 8026, 9055, 10058, 20047, 30092, 40017, 50008, 60054, 70063, 80065, 90022, 100058, 200051, 300060, 400093, 500028, 600074, 700013, 800022, 900055, 1000006, 2000047, 3000008, 4000061, 5000034, 6000055, 7000008, 8000056, 9000013, 10000036, 20000038, 30000029, 40000039, 50000030, 60000051, 70000064, 80000064, 90000077
Offset: 1

Views

Author

N. J. A. Sloane, Nov 21 2023

Keywords

Comments

These are the terms in A121805 where either the leading digit or the length has just changed.

Crossrefs

Programs

  • Python
    def agen(): # generator of terms
        n, an, y, prev_lead, prev_length = 1, 1, 1, None, None
        while y < 10:
            san = str(an)
            lead, length = san[0], len(san)
            if lead != prev_lead or length != prev_length:
                yield an
            an, y = an + 10*(an%10), 1
            while y < 10:
                if str(an+y)[0] == str(y):
                    an += y
                    break
                y += 1
            n, prev_lead, prev_length = n+1, lead, length
    print(list(agen())) # Michael S. Branicky, Nov 22 2023

Extensions

More than the usual number of terms are shown in order to match the data in A367358.
More terms from Michael S. Branicky, Nov 22 2023
Showing 1-5 of 5 results.