login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A261788
a(n) is the smallest k such that A261786(k) >= 3^n.
2
1, 2, 5, 12, 30, 81, 224, 626, 1747, 4909, 13811, 38934, 109889, 310666, 880125, 2500221, 7125406, 20376598, 58472481, 168349612, 486198698, 1408140693, 4088769215, 11899761717, 34703682407
OFFSET
0,2
PROG
(Haskell)
a261788 n = a261788_list !! (n-1)
a261788_list = f 1 1 a261786_list' where
f z k (x:xs) | x >= z = k : f (3 * z) (k + 1) xs
| otherwise = f z (k + 1) xs
(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(last=1, k=0, p=3^k); for (n=1, nn, if (last >= p, print1(n, ", "); k++; p = 3^k); last += f(last); ); \\ Michel Marcus, Feb 06 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, Sep 01 2015
EXTENSIONS
a(11)-a(20) from Michel Marcus, Feb 06 2022
a(21)-a(24) from Jinyuan Wang, Dec 13 2024
STATUS
approved