login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A371706 a(n) is the least k > 0 such that n^k contains the digit 1. 2
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
First n such that a(n) = k: 1, 4, 5, 2, 74, 94, 305, 2975 for k = 1 to 8.
a(n) <= 8 for n <= 240000000. Is a(n) ever greater than 8?
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
a(n) <= 8 for n <= 10^13, and a(n) <= 17 for all n; see A275533. - Michael S. Branicky, Apr 08 2024
LINKS
FORMULA
a(n) <= A098174(n).
EXAMPLE
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.
MAPLE
g:= proc(n) local k;
for k from 1 do if member(1, convert(n^k, base, 10)) then return k fi od;
end proc:
map(g, [$1..100]);
MATHEMATICA
seq={}; Do[k=1; While[!ContainsAny[IntegerDigits[n^k], {1}], k++]; AppendTo[seq, k], {n, 99}]; seq (* James C. McMahon, Apr 05 2024 *)
PROG
(Python)
from itertools import count
def A371706(n):
m = n
for k in count(1):
if '1' in str(m):
return k
m *= n # Chai Wah Wu, Apr 04 2024
CROSSREFS
Sequence in context: A031351 A068923 A222295 * A103714 A260486 A193514
KEYWORD
nonn,base
AUTHOR
Robert Israel, Apr 03 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 23:12 EDT 2024. Contains 375310 sequences. (Running on oeis4.)