login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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)
print(n, p) # A.H.M. Smeets, Aug 16 2019
CROSSREFS
Cf. A067442.
Sequence in context: A063566 A153690 A018811 * A376972 A100844 A076587
KEYWORD
nonn,base
AUTHOR
Robert Israel, Aug 13 2019
STATUS
approved