A369603 S is a "boomerang sequence": adding 9 to each digit of S and following the result with a comma leaves S unchanged.
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
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.
Links
- Éric Angelini and Giorgos Kalogeropoulos, The same sequence but differently, personal blog, Jan 24th 2024.
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
Comments