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”).

A244606
Least number k > 1 such that k^n contains the digit k k times, or 0 if no such digit exists.
0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 5, 3, 2, 7, 0, 0, 5, 3, 6, 4, 0, 3, 5, 3, 0, 2, 6, 5, 3, 0, 0, 0, 6, 2, 3, 4, 2, 4, 2, 2, 2, 3, 4, 3, 5, 2, 2, 4, 5, 2, 2, 0, 4, 0, 3, 7, 2, 5, 3, 4, 0, 4, 2, 4, 2, 7, 7, 7, 2, 0, 3, 2, 8, 6, 6, 2, 0, 3, 7, 2, 4, 0, 6, 0, 0, 0, 8, 5, 4, 3, 0, 0, 6, 5, 2, 5, 0, 8, 3
OFFSET
1,18
COMMENTS
1 < a(n) < 10 if a(n) is not 0. Thus a(n) = 0 is definite for the n-values above.
EXAMPLE
2^18, 2^19 and 2^21 all contain the digit 2 twice. So a(18) = a(19) = a(21) = 2.
PROG
(Python)
def tes(n):
..for k in range(2, 10):
....if str(k**n).count(str(k)) == k:
......return k
n = 1
while n < 200:
..if tes(n):
....print(tes(n), end=', ')
..else:
....print(0, end=', ')
..n += 1
CROSSREFS
Sequence in context: A141720 A353449 A248017 * A273127 A103272 A065710
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Jul 01 2014
STATUS
approved