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 A235052 #29 Jan 25 2022 12:26:30 %S A235052 2,5,4,5,2,4,2,2,2,2,2,3,2,4,2,3,2,2,2,3,2,3,3,2,2,3,2,2,2,2,2,2,2,4, %T A235052 3,3,2,2,3,2,2,3,2,2,2,3,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,3,2,2,2,2, %U A235052 2,2,2,2,2,3,2,2,2,2,2,2,2,2,3,2,2,2,2 %N A235052 a(n) = smallest number > 1 such that a(n)^n contains a(n) as a substring. %C A235052 It is very probable that a(n) = 2 for n > 169. %C A235052 a(n) <= 5 since 5^n ends in 5 for n > 0. - _Michael S. Branicky_, Jan 25 2022 %H A235052 Michael S. Branicky, <a href="/A235052/b235052.txt">Table of n, a(n) for n = 1..10000</a> %e A235052 4 is the smallest number such that 4^3 contains a 4 and 4^6 contains a 4, so a(3) = 4 and a(6) = 4. %t A235052 a[n_] := Block[{k = 2}, While[StringPosition[ToString[k^n], ToString@k] == {}, k++]; k]; Array[a, 80] (* _Giovanni Resta_, Jan 11 2014 *) %o A235052 (Python) %o A235052 def f(x): %o A235052 for n in range(2,10**3): %o A235052 if str(n**x).count(str(n)) > 0: %o A235052 return n %o A235052 x = 1 %o A235052 while x < 200: %o A235052 print(f(x)) %o A235052 x += 1 %o A235052 (Python) %o A235052 def a(n): return min(k for k in range(2, 6) if str(k) in str(k**n)) %o A235052 print([a(n) for n in range(1, 88)]) # _Michael S. Branicky_, Jan 25 2022 %o A235052 (Haskell) %o A235052 import Data.List (isInfixOf) %o A235052 a235052 n = head [x | x <- [2..], show x `isInfixOf` (show $ x ^ n)] %o A235052 -- _Reinhard Zumkeller_, Jan 18 2014 %o A235052 (PARI) a(n) = my(k=2); while(#strsplit(Str(k^n), Str(k))==1, k++); k; \\ _Michel Marcus_, Jan 25 2022 %Y A235052 Cf. A034293, A236046. %K A235052 nonn,base %O A235052 1,1 %A A235052 _Derek Orr_, Jan 02 2014 %E A235052 a(81) and beyond from _Michael S. Branicky_, Jan 25 2022