login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261788 a(n) = smallest k such that A261786(k) >= 3^n. 2

%I #9 Feb 06 2022 10:07:07

%S 1,2,5,12,30,81,224,626,1747,4909,13811,38934,109889,310666,880125,

%T 2500221,7125406,20376598,58472481,168349612,486198698

%N a(n) = smallest k such that A261786(k) >= 3^n.

%o (Haskell)

%o a261788 n = a261788_list !! (n-1)

%o a261788_list = f 1 1 a261786_list' where

%o f z k (x:xs) | x >= z = k : f (3 * z) (k + 1) xs

%o | otherwise = f z (k + 1) xs

%o (PARI) ts(n) = Str(fromdigits(digits(n, 3))); \\ A007089

%o f(n) = my(s=ts(n), k=1); while (#strsplit(s, ts(k)) != 1, k++); k; \\ A261787

%o 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 Cf. A261786, A000244, A261396, A261806.

%K nonn,more

%O 0,2

%A _Reinhard Zumkeller_, Sep 01 2015

%E a(11)-a(20) from _Michel Marcus_, Feb 06 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 1 03:42 EDT 2024. Contains 374810 sequences. (Running on oeis4.)