OFFSET
0,13
EXAMPLE
PROG
(Haskell)
import Data.List (inits, isPrefixOf)
a197945 n = length $ takeWhile (`isPrefixOf` (show $ a096095 $ n+1)) $
tail $ inits $ show $ a096095 n
(Python)
from itertools import islice
from os.path import commonprefix
def dws(s, t): # returns string s ++ t where s and t are digits strings, len(s) <= len(t)
return "".join(str(int(c)+int(d)) for c, d in zip(s.zfill(len(t)), t))
def agen(): # generator of terms
s, t = "1", "1"
while True:
yield len(commonprefix([s, t]))
s, t = t, dws(s, t)
print(list(islice(agen(), 59))) # Michael S. Branicky, Nov 08 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 19 2011
STATUS
approved
