proposed
approved
proposed
approved
editing
proposed
Least number k not divisible by 10 such that the decimal expansion of k^n contains some integer digit exactly n times.
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
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
1^2, 2^2, 3^2, 4^2, ... 9^2 all have differeny different digits. 11^2 = 121 has two of the same digit. So a(2) = 11.
(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
proposed
editing
editing
proposed
allocated for Derek OrrLeast number k not divisible by 10 such that k^n contains some integer exactly n times.
1, 11, 36, 34, 99, 258, 391, 163, 341, 951, 867, 1692, 1114, 793, 4792, 3019, 1935, 5469, 6398, 6152, 8906, 1987, 15815, 19603, 16292, 26216, 32113, 19718, 24354, 45903, 15776, 42202, 34572, 44411, 46911, 67972, 39291, 52299, 30499, 28383, 38001, 89782, 95017, 55954
1,2
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, ...
1^2, 2^2, 3^2, 4^2, ... 9^2 all have differeny digits. 11^2 = 121 has two of the same digit. So a(2) = 11.
(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
allocated
nonn,base
Derek Orr, May 31 2014
approved
editing
allocated for Derek Orr
allocated
approved