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 A248018 #37 May 22 2025 10:21:41 %S A248018 1,43,119,96,186,1740,6177,8421,104191,0,946417 %N A248018 Least number k > 0 such that n^k contains n*R_n in its decimal representation, or 0 if no such k exists. %C A248018 R_n is the repunit of length n, i.e., R_n = (10^n-1)/9, A002275. %C A248018 a(10^n) = 0 for all n > 0. - _Derek Orr_, Sep 29 2014 %C A248018 a(9) > 86000. - _Derek Orr_, Sep 29 2014 %C A248018 Note that a(2) = A030000(22), and a(3) = A063566(333), and that sequence is also related in a similar way to sequences from A063567 up to A063572. - _Michel Marcus_, Sep 30 2014 %e A248018 a(2) = 43 because 2^43 = 8796093022208 has the string '22' in it and 43 is the smallest power of 2 that produces such a result. %e A248018 a(3) = 119 because 3^119 = 599003433304810403471059943169868346577158542512617035467 contains the string '333', and 119 is the smallest power of 3 that gives us such a result. %o A248018 (Python) %o A248018 def a(n): %o A248018 s = str(n) %o A248018 p = len(s) %o A248018 if s.count('1') == 1 and s.count('0') == p - 1: %o A248018 return 0 %o A248018 k = 1 %o A248018 while not str(n**k).count(n*s): %o A248018 k += 1 %o A248018 return k %o A248018 n = 1 %o A248018 while n < 10: %o A248018 print(a(n),end=', ') %o A248018 n += 1 %o A248018 # _Derek Orr_, Sep 29 2014 %Y A248018 Cf. A002275. %K A248018 base,nonn,hard,more %O A248018 1,2 %A A248018 _Talha Ali_, Sep 29 2014 %E A248018 a(3) and a(5) corrected, a(6)-a(8) added by _Derek Orr_, Sep 29 2014 %E A248018 a(4) corrected and a(9)-a(11) added by _Hiroaki Yamanouchi_, Oct 01 2014