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 A071531 #39 Dec 15 2021 02:36:44 %S A071531 10,10,5,8,9,4,4,5,1,5,4,6,7,4,3,7,4,4,1,5,3,6,6,4,6,5,5,4,1,6,2,2,3, %T A071531 4,5,3,4,5,1,5,3,3,4,2,5,2,2,2,1,2,2,2,4,2,5,4,6,3,1,5,6,3,2,4,6,3,9, %U A071531 3,1,2,6,3,3,4,8,4,2,3,1,4,5,5,2,4,3,3,6,3,1,5,5,3,3,2,7,2,2,2,1,1,1,1,1,1 %N A071531 Smallest exponent r such that n^r contains at least one zero digit (in base 10). %C A071531 For all n, a(n) is at most 40000, as shown below. Is 10 an upper bound? %C A071531 If n has d digits, the numbers n, n^2, ..., n^k have a total of about N = k*(k+1)*d/2, and if these were chosen randomly the probability of having no zeros would be (9/10)^N. The expected number of d-digit numbers n with f(n)>k would be 9*10^(d-1)*(9/10)^N. If k >= 7, (9/10)^(k*(k+1)/2)*10 < 1 so we would expect heuristically that there should be only finitely many n with f(n) > 7. - _Robert Israel_, Jan 15 2015 %C A071531 The similar definition using "...exactly one digit 0..." would be ill-defined for all multiples of 100 and others (1001, ...). - _M. F. Hasler_, Jun 25 2018 %C A071531 When r=40000, one of the last five digits of n^r is always 0. Working modulo 10^5, we have 2^r=9736 and 5^r=90625, and both of these are idempotent; also, if gcd(n,10)=1, then n^r=1, and if 10|n, then n^r=0. Therefore the last five digits of n^r are always either 00000, 00001, 09736, or 90625. In particular, a(n) <= 40000. - _Mikhail Lavrov_, Nov 18 2021 %H A071531 Robert Israel, <a href="/A071531/b071531.txt">Table of n, a(n) for n = 2..10000</a> %H A071531 OEIS Wiki, <a href="/wiki/Zeroless powers">Zeroless powers</a> (2014). %F A071531 a(n) >= 1 with equality iff n is in A011540 \ {0} = {10, 20, ..., 100, 101, ...}. - _M. F. Hasler_, Jun 23 2018 %e A071531 a(4)=5 because 4^1=4, 4^2=16, 4^3=64, 4^4=256, 4^5=1024 (has zero digit). %p A071531 f:= proc(n) local j; %p A071531 for j from 1 do if has(convert(n^j,base,10),0) then return j fi od: %p A071531 end proc: %p A071531 seq(f(n),n=2..100); # _Robert Israel_, Jan 15 2015 %t A071531 zd[n_]:=Module[{r=1},While[DigitCount[n^r,10,0]==0,r++];r]; Array[zd,110,2] (* _Harvey P. Dale_, Apr 15 2012 *) %o A071531 (Python) %o A071531 def a(n): %o A071531 r, p = 1, n %o A071531 while 1: %o A071531 if "0" in str(p): %o A071531 return r %o A071531 r += 1 %o A071531 p *= n %o A071531 [a(n) for n in range(2, 100)] # Tim Peters, May 19 2005 %o A071531 (PARI) A071531(n)=for(k=1, oo, vecmin(digits(n^k))||return(k)) \\ _M. F. Hasler_, Jun 23 2018 %Y A071531 Cf. A305941 for the actual powers n^k. %Y A071531 Cf. A007377, A030700, A030701, A008839, A030702, A030703, A030704, A030705, A030706, A195944: decimal expansion of k^n contains no zeros, k = 2, 3, 4, ... %Y A071531 Cf. A305932, A305933, A305924, ..., A305929: row n = {k: x^k has n 0's}, x = 2, 3, ..., 9. %Y A071531 Cf. A305942, ..., A305947, A305938, A305939: #{k: x^k has n 0's}, x = 2, 3, ..., 9. %Y A071531 Cf. A306112, ..., A306119: largest k: x^k has n 0's; x = 2, 3, ..., 9. %K A071531 base,nonn %O A071531 2,1 %A A071531 Paul Stoeber (paul.stoeber(AT)stud.tu-ilmenau.de), Jun 02 2002