|
|
A309707
|
|
a(n) is the least integer k > 1 such that k^n starts with 1.
|
|
2
|
|
|
10, 4, 5, 2, 4, 5, 2, 6, 3, 2, 3, 4, 3, 2, 3, 5, 2, 6, 3, 2, 3, 4, 5, 2, 4, 5, 2, 8, 5, 2, 6, 3, 5, 2, 4, 3, 2, 3, 5, 2, 8, 3, 5, 2, 4, 5, 2, 10, 5, 2, 7, 10, 3, 2, 3, 5, 2, 6, 3, 2, 3, 6, 3, 2, 3, 5, 2, 10, 5, 2, 6, 6, 5, 2, 4, 3, 2, 3, 5, 2, 6, 3, 5, 2, 4, 3, 2, 10, 5, 2, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
1 <= a(n) <= 10.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = A067442(n)^(1/n) for n >= 2.
|
|
EXAMPLE
|
a(3)=5 because 5^3=125 starts with 1, and none of 2^3, 3^3, 4^3 do.
|
|
MAPLE
|
f:= proc(n) local d, x, y;
for x from 2 to 10 do
y:= x^n;
if floor(y/10^ilog10(y)) = 1 then return x fi
od
end proc:
map(f, [$1..100]);
|
|
MATHEMATICA
|
lik[n_]:=Module[{k=2}, While[IntegerDigits[k^n][[1]]!=1, k++]; k]; Array[ lik, 100] (* Harvey P. Dale, Dec 06 2019 *)
|
|
PROG
|
(Magma) m:=1; sol:=[]; for n in [1..100] do k:=2; while Reverse(Intseq(k^n))[1] ne 1 do k:=k+1; end while; sol[m]:=k; m:=m+1; end for; sol; // Marius A. Burtea, Aug 15 2019
(PARI) a(n) = {my(k=2); while(digits(k^n)[1] != 1, k++); k; } \\ Michel Marcus, Aug 15 2019
(Python)
print(1, 10)
n = 1
while n < 100:
n, p = n+1, 2
s = str(p**n)
while s[0] != "1":
p = p+1
s = str(p**n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|