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 A186774 #20 Dec 11 2021 04:30:10 %S A186774 32,243,256,625,7776,16807,4096,31381059609,0,121, %T A186774 79496847203390844133441536,51185893014090757,155568095557812224, %U A186774 22168378200531005859375,17592186044416,118587876497,11019960576,42052983462257059 %N A186774 Smallest power of n whose decimal expansion contains n+1, or 0 if no such number exists. %C A186774 More precisely: smallest power of n (with positive integer exponent) whose decimal expansion contains n+1 as a substring of consecutive decimal digits. This is A[n,n+1], the diagonal above the trivial main diagonal of the array A[k,n] = Smallest power of k whose decimal expansion contains n. %C A186774 The k=2 row A[2,n] = A030001. %C A186774 The k=3 row A[3,n] = A176763. %C A186774 The k=4 row A[4,n] = A176764. %C A186774 The k=5 row A[5,n] = A176765... %C A186774 a(10^k+1) = (10^k+1)^2 for k > 0. - _Chai Wah Wu_, Feb 13 2017 %H A186774 Chai Wah Wu, <a href="/A186774/b186774.txt">Table of n, a(n) for n = 2..1999</a> %e A186774 a(2) = 32 = A030001(3) = smallest power of 2 whose decimal expansion contains 3. %e A186774 a(3) = 243 = A176763(4) = smallest power of 3 whose decimal expansion contains 4. %p A186774 a:= proc(n) local t, k; %p A186774 if type(simplify(log[10](n)), integer) then 0 %p A186774 else t:= cat(n+1); %p A186774 for k from 2 while searchtext(t, cat(n^k))=0 %p A186774 do od; n^k %p A186774 fi %p A186774 end: %p A186774 seq(a(n), n=2..40); # _Alois P. Heinz_, Feb 26 2011 %o A186774 (Python) %o A186774 def A186774(n): %o A186774 if sum(int(d) for d in str(n)) == 1: %o A186774 return 0 %o A186774 sn, k = str(n+1), 1 %o A186774 while sn not in str(k): %o A186774 k *= n %o A186774 return k # _Chai Wah Wu_, Feb 13 2017 %Y A186774 Cf. A018856, A063565, A030001, A176763-A176773. %K A186774 nonn,base,easy %O A186774 2,1 %A A186774 _Jonathan Vos Post_, Feb 26 2011