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 A131546 #22 May 21 2025 15:16:27 %S A131546 3,11,112,184,721,3520,6643,12793,67448,208380,364578,1123485,9549790, %T A131546 23340555,88637856 %N A131546 Least power of 3 having exactly n consecutive 7's in its decimal representation. %C A131546 No more terms < 10^8. - _Bert Dobbelaere_, Mar 20 2019 %F A131546 a(1) = A063566(7). - _Michel Marcus_, Aug 05 2014 %e A131546 a(2) = 11 because 3^11 = 177147 is the smallest power of 3 to contain a run of two consecutive 7's in its decimal form. %t A131546 a = ""; Do[ a = StringJoin[a, "7"]; b = StringJoin[a, "7"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 10} ] %o A131546 (Python) %o A131546 import sys %o A131546 sys.set_int_max_str_digits(1000000) %o A131546 def A131546(n): %o A131546 str7 = '7'*n %o A131546 x, exponent = 3, 1 %o A131546 while not str7 in str(x): %o A131546 exponent += 1 %o A131546 x *= 3 %o A131546 return exponent # _Chai Wah Wu_, Aug 05 2014 %Y A131546 Cf. A195269, A131552, A131551, A131550, A131549, A131548, A131547, A131545, A131544. %K A131546 more,nonn,base %O A131546 1,1 %A A131546 _Shyam Sunder Gupta_, Aug 26 2007 %E A131546 a(11)-a(13) from _Lars Blomberg_, Feb 02 2013 %E A131546 a(14)-a(15) from _Bert Dobbelaere_, Mar 20 2019