OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(Haskell)
a261786 n = a261786_list !! (n-1)
a261786_list = iterate (\x -> x + a261787 x) 1
(PARI) ts(n) = Str(fromdigits(digits(n, 3))); \\ A007089
f(n) = my(s=ts(n), k=1); while (#strsplit(s, ts(k)) != 1, k++); k; \\ A261787
lista(nn) = my(v = vector(nn)); v[1] = 1; for (n=2, nn, v[n] = v[n-1] + f(v[n-1]); ); v; \\ Michel Marcus, Feb 06 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Sep 01 2015
STATUS
approved