OFFSET
1,2
COMMENTS
If k were divisible by 10, all of those numbers would work for any n and the sequence would be 1, 10, 10, 10, 10, 10, 10, 10, ....
Does a(n) exist for each n? - Charles R Greathouse IV, May 31 2014
FORMULA
a(n) > 10 for all n > 1. (Proof: check up to 21, then note that 9^22 < 10^21.) Charles R Greathouse IV, May 31 2014
EXAMPLE
1^2, 2^2, 3^2, 4^2, ... 9^2 all have different digits. 11^2 = 121 has two of the same digit. So a(2) = 11.
PROG
(Python)
def c(n):
..for k in range(10**5):
....if k%10 !=0:
......count = 0
......for i in range(10):
........if str(k**n).count(str(i)) == n:
..........return k
n = 1
while n < 100:
..print(c(n))
..n+=1
(PARI) digitct(n)=my(d=digits(n)); vector(10, i, sum(j=1, #d, d[j]==i-1))
a(n)=if(n==1, return(1)); my(k=9); until(k++%10 && #select(i->i==n, digitct(k^n)), ); k \\ Charles R Greathouse IV, May 31 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, May 31 2014
STATUS
approved