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 A320572 #68 May 27 2020 12:01:05 %S A320572 0,15,8,10,11,12,7,5,6,0,7,6,6,5,9,5,6,4,5,15,8,6,4,5,8,5,4,5,7,8,7,7, %T A320572 6,8,7,6,6,5,6,10,7,6,6,5,6,6,5,7,6,11,6,6,6,4,5,7,4,5,4,12,4,6,7,7,8, %U A320572 4,4,5,3,7,4,5,6,7,6,4,5,6,4,5,6,5,4,4,6,5,5,4,7,6,4,5,4,6,4,4,4,6 %N A320572 The smallest integer m such that each nonzero digit appears in the decimal representation of the sequence n^1, n^2, ..., n^x, where 1 <= x <= m, or 0 if no such m exists. %C A320572 7 is the only fixed point less than 10. %F A320572 a(n) = a(10*n). %F A320572 a(n) <= A090493(n). - _Rémy Sigrist_, Oct 16 2018 %e A320572 For n=1, a(1) = 0, because all powers are identical to 1, and it is not possible to get any other digits. %e A320572 For n=3, a(3) = 8 because the following are needed to use all nonzero digits: 3^1 = 3, 3^2 = 9, 3^3 = 27, 3^4 = 81, 3^5 = 243, 3^8 = 6561. %e A320572 For n=10, a(10) = 0, because one can only get digits 0 and 1. %t A320572 a[n_] := If[IntegerQ[Log10[n]], 0, Module[{s={0}, m=1}, While[Length[s]<10, s=DeleteDuplicates@Catenate[{s,IntegerDigits[n^m]}]; m++]; m-1]]; Array[a,100] (* _Amiram Eldar_, Nov 14 2018 *) %o A320572 (Python) %o A320572 def A320572(n): %o A320572 n = int(str(n).strip('0')) %o A320572 if n != 1: %o A320572 s = set(range(1, 10)) %o A320572 a = 0 %o A320572 m = 1 %o A320572 while s: %o A320572 a += 1 %o A320572 m *= n %o A320572 s.difference_update(int(z) for z in str(m)) %o A320572 return a %o A320572 else: %o A320572 return 0 %o A320572 (PARI) a(n) = {if (10^valuation(n, 10) == n, return(0)); v = []; kn = n; for (m=1, oo, v = Set(concat(v, digits(n))); v = select(x->(x>0), v); if (#v == 9, return (m)); n *= kn;);} \\ _Michel Marcus_, Oct 17 2018 %o A320572 (PARI) a(n) = {if(vecsum(digits(n))==1, return(0)); my(v = vector(9), todo = 9, t = n); for(i=1, oo, d=digits(t); for(j = 1, #d, if(d[j] > 0 && v[d[j]] == 0, todo--; v[d[j]] = 1; if(todo <= 0, return(i)))); t*=n)} \\ _David A. Corneth_, Oct 17 2018 %Y A320572 Cf. A090493. %K A320572 nonn,base %O A320572 1,2 %A A320572 _Benjamin Knight_, Oct 15 2018