|
|
A244603
|
|
Least number k such that n^k contains the digit n n times.
|
|
2
|
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
2^18 is the first power of 2 to contain 2 twice. So a(2) = 18.
3^21 is the first power of 3 to contain 3 three times. So a(3) = 21.
|
|
PROG
|
(Python)
def tes(n):
for k in range(1, 10**3):
if(str(n**k).count(str(n))) == n:
return k
n = 1
while n < 10:
print(tes(n), end=', ')
n += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,fini,full
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|