This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A261788 #13 Dec 14 2024 05:30:39 %S A261788 1,2,5,12,30,81,224,626,1747,4909,13811,38934,109889,310666,880125, %T A261788 2500221,7125406,20376598,58472481,168349612,486198698,1408140693, %U A261788 4088769215,11899761717,34703682407 %N A261788 a(n) is the smallest k such that A261786(k) >= 3^n. %o A261788 (Haskell) %o A261788 a261788 n = a261788_list !! (n-1) %o A261788 a261788_list = f 1 1 a261786_list' where %o A261788 f z k (x:xs) | x >= z = k : f (3 * z) (k + 1) xs %o A261788 | otherwise = f z (k + 1) xs %o A261788 (PARI) ts(n) = Str(fromdigits(digits(n, 3))); \\ A007089 %o A261788 f(n) = my(s=ts(n), k=1); while (#strsplit(s, ts(k)) != 1, k++); k; \\ A261787 %o A261788 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 %Y A261788 Cf. A000244, A261396, A261786, A261806. %K A261788 nonn,more %O A261788 0,2 %A A261788 _Reinhard Zumkeller_, Sep 01 2015 %E A261788 a(11)-a(20) from _Michel Marcus_, Feb 06 2022 %E A261788 a(21)-a(24) from _Jinyuan Wang_, Dec 13 2024