OFFSET
0,4
COMMENTS
Formally, define strings of digits S_i as follows. S_0={0}, S_1={0,1}. For n >= 1, let S_n={t_0, t_1, ..., t_z}. Then S_{n+1} is obtained by adjoining the digits of t_{n-1}+t_n to S_n. The sequence gives the limiting string S_oo.
All digits appear infinitely often, although the sequence is not periodic.
For any d, there exists an index where at least d consecutive 9's occur and there exists an index where at least d consecutive (1, 8)'s occur. - Michael S. Branicky, Nov 07 2025
LINKS
Hakan Icoz, Table of n, a(n) for n = 0..20000
EXAMPLE
After S_6 = {0,1,1,2,3,5,8} we have 5+8 = 13, so we get
S_7 = {0,1,1,2,3,5,8,1,3}. Then 8+1 = 9, so we get
S_8 = {0,1,1,2,3,5,8,1,3,9}. Then 1+3 = 4, so we get
S_9 = {0,1,1,2,3,5,8,1,3,9,4}, and so on.
MAPLE
with(linalg): A:=matrix(1, 2, [0, 1]): for n from 1 to 100 do if A[1, n]+A[1, n+1]<10 then A:=concat(A, matrix(1, 1, A[1, n]+A[1, n+1])) else A:=concat(A, matrix(1, 2, [1, A[1, n]+A[1, n+1]-10])) fi od: matrix(A); # Emeric Deutsch, May 31 2005
MATHEMATICA
Fold[Join[#, IntegerDigits[Total[#[[#2;; #2+1]]]]] &, {0, 1}, Range[100]] (* Paolo Xausa, Aug 18 2025 *)
PROG
(Python)
from itertools import count, islice
def agen():
alst = [0, 1]
yield from alst
for n in count(2):
t = alst[n-2]+alst[n-1]
if t > 9: alst.extend([1, t-10])
else: alst.append(t)
yield alst[n]
print(list(islice(agen(), 106))) # Michael S. Branicky, Nov 07 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Bodo Zinser, Mar 20 2004
EXTENSIONS
Edited by N. J. A. Sloane, Mar 20 2010
STATUS
approved
