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.

A369603 S is a "boomerang sequence": adding 9 to each digit of S and following the result with a comma leaves S unchanged.

Original entry on oeis.org

10, 9, 18, 10, 17, 10, 9, 10, 16, 10, 9, 18, 10, 9, 10, 15, 10, 9, 18, 10, 17, 10, 9, 18, 10, 9, 10, 14, 10, 9, 18, 10, 17, 10, 9, 10, 16, 10, 9, 18, 10, 17, 10, 9, 18, 10, 9, 10, 13, 10, 9, 18, 10, 17, 10, 9, 10, 16, 10, 9, 18, 10, 9, 10, 15, 10, 9, 18, 10, 17, 10, 9, 10, 16, 10, 9, 18, 10, 17, 10, 9, 18, 10, 9
Offset: 1

Views

Author

Keywords

Comments

Lexicographically earliest sequence starting with a(1) = 10.
The only integers that appear in the sequence are 9, 10, 11, 12, 13, 14, 15, 16, 17 and 18.
Is this (apart from the first term) the same as A103700? - R. J. Mathar, Feb 12 2024

Examples

			Adding 9 to 1 (the 1st digit of 10) gives 10
Adding 9 to 0 (the 2nd digit of 10) gives 9
Adding 9 to 9 (the only digit of 9) gives 18
Adding 9 to 1 (the 1st digit of 18) gives 10
Adding 9 to 8 (the 2nd digit of 18) gives 17, etc.
We see that the last column above is the sequence S itself.
		

Crossrefs

Programs

  • Mathematica
    a[1]=10;a[n_]:=a[n]=Flatten[IntegerDigits/@Array[a,n-1]][[n]]+9;Array[a,100]
  • Python
    from itertools import islice
    def agen(): # generator of terms
        an, digits = 10, [0]
        while True:
            yield an
            an = 9 + digits.pop(0)
            digits += list(map(int, str(an)))
    print(list(islice(agen(), 84))) # Michael S. Branicky, Jan 27 2024