OFFSET
1,2
COMMENTS
Digits after the decimal point are allowed, so a(1)=a(10)=1.
a(n) always exists and is bounded: see proof at A217157.
Conjecture: a(n) <= 231.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(6) = 9 because 6^9 = 10077696 and no lower power of 6 starts with 99 or 100.
MAPLE
f:=proc(n) local k, v, r;
v:= 1;
for k from 1 do
v:= v*n;
r:= v/10^(ilog10(v));
if r < 101/100 or r >= 99/10 then return k fi
od
end proc:
map(f, [$1..100]);
PROG
(Python)
def A306540(n):
if n == 1 or n == 10:
return 1
k, nk = 1, n
while True:
s = str(nk)
if s[:2] == '99' or s[:3] == '100':
return k
k += 1
nk *= n # Chai Wah Wu, Feb 22 2019
CROSSREFS
KEYWORD
AUTHOR
Robert Israel, Feb 22 2019
STATUS
approved