# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a371706 Showing 1-1 of 1 %I A371706 #27 Apr 08 2024 18:46:11 %S A371706 1,4,4,2,3,3,4,3,2,1,1,1,1,1,1,1,1,1,1,4,1,3,3,3,3,3,3,3,2,4,1,2,2,2, %T A371706 2,2,2,2,2,2,1,2,2,2,3,2,3,3,2,3,1,3,3,2,3,2,3,3,2,3,1,4,4,3,4,4,4,3, %U A371706 2,4,1,2,3,5,3,4,4,4,2,3,1,3,3,4,3,4,4,3,2,2,1,4,4,6,4,2,3,3,2 %N A371706 a(n) is the least k > 0 such that n^k contains the digit 1. %C A371706 First n such that a(n) = k: 1, 4, 5, 2, 74, 94, 305, 2975 for k = 1 to 8. %C A371706 a(n) <= 8 for n <= 240000000. Is a(n) ever greater than 8? %C A371706 a(n) <= 8 for n <= 10^11. Moreover the only n <= 10^11 with a(n) = 8 are 2975 * 10^j. - _Robert Israel_, Apr 05 2024 %C A371706 a(n) <= 8 for n <= 10^13, and a(n) <= 17 for all n; see A275533. - _Michael S. Branicky_, Apr 08 2024 %H A371706 Robert Israel, Table of n, a(n) for n = 1..10000 %F A371706 a(n) <= A098174(n). %e A371706 a(3) = 4 because 3^1, 3^2 = 9 and 3^3 = 27 have no 1's, but 3^4 = 81 does have a 1. %p A371706 g:= proc(n) local k; %p A371706 for k from 1 do if member(1,convert(n^k,base,10)) then return k fi od; %p A371706 end proc: %p A371706 map(g, [$1..100]); %t A371706 seq={};Do[k=1;While[!ContainsAny[IntegerDigits[n^k],{1}],k++];AppendTo[seq,k],{n,99}];seq (* _James C. McMahon_, Apr 05 2024 *) %o A371706 (Python) %o A371706 from itertools import count %o A371706 def A371706(n): %o A371706 m = n %o A371706 for k in count(1): %o A371706 if '1' in str(m): %o A371706 return k %o A371706 m *= n # _Chai Wah Wu_, Apr 04 2024 %Y A371706 Cf. A098174, A255430, A255357, A275533. %K A371706 nonn,base %O A371706 1,2 %A A371706 _Robert Israel_, Apr 03 2024 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE