[go: up one dir, main page]

login
A244604
Least number k such that k^n contains the digit n n times.
1
1, 1, 15, 179, 261, 435, 426, 1083, 2169, 2137
OFFSET
0,3
EXAMPLE
1 is the smallest number such that 1^0 contains 0 zero times. So a(0) = 1.
15 is the smallest number such that 15^2 contains 2 twice. So a(2) = 15.
261 is the smallest number such that 261^4 contains 4 four times. So a(4) = 261.
PROG
(Python)
def tes(n):
for k in range(1, 10**4):
if(str(k**n).count(str(n))) == n:
return k
n = 0
while n < 10:
print(tes(n), end=', ')
n += 1
CROSSREFS
Cf. A244603.
Sequence in context: A009146 A012800 A016216 * A001717 A293476 A004992
KEYWORD
nonn,base,fini,full
AUTHOR
Derek Orr, Jul 01 2014
STATUS
approved