Combinatorics: All digits to be found in arbitrary number systems How many 10-digit numbers are there in the base 7 number system, where all the digits are found? How would you solve this task?
edit:
count of all 10-digit numbers: $ 6 *7^9$. That's all the cases. I would substract the number of cases where at least one of the 0,1,2,3,4,5,6 digits is missing in the number chosen. But I can't find out how much this is.
Another theory (this might not be right but) Let's say that I have a number for the first place value, so 6 unique digits left. I put another digit to the second place, 5 left, and so on. I'm left with 7 fixed unique digits and 3 arbitrary other digits. I have each of the digits in the first 7 places, which can be shuffled $6*6!$ different ways.. There are 3 digits left in the end. The problem is that even though I have lots of combinations with different numbers, the other 3 digits are at the end of my number. 
 A: what is the largest 10 digit number in the base 7 number system? What is the smallest 10 digit number? Are all numbers in between also 10 digit numbers?
All the digits are found. therefore we know that there are 7 digits once, and three remaining digits. We divide in three cases.
The three remaining digits are the same:
If all three are 0 then we have 4 0's and 1 of each other. First we chose the positions for the 0's in $\binom{9}{4}$. Then We chose a permutation of the non-zero elements in 6! to get 90720 numbers.
If the repeated  three are non-zero we first chose the location of the zero in 9 ways. Then we chose the location for the 4 repeated elements in $\binom{8}{4}$ and finally we pick the permutation of the remaining 5 elements in 5! ways giving us 75600 ways(multiplied by 6 since there are 6 non-zero digits)=453600.
two of the remaining digits are the same and one is different:
if none of them are zero then first we chose position for 0 in 9 ways.Then we chose which ones are repeated three and two times in $6*5=30$ ways Then we chose the position of the number that is there two times in $\binom{9}{2}$ and then we chose the position of the number that is there three times in $\binom{7}{3}$ ways. finally we chose a permutation for the remaining 4 elements in 4! ways. giving us 8164800.
if the one repeated twice is zero then we fix it first in $\binom{9}{2}$ ways ,pick the number repeated three times in 6 ways, and then pick the place for the one repeated three times in $\binom{8}{3}$ ways finally pick permutation of remaining in 5! ways to get 1451520 ways.
if the one repeated three times is 0 and the other one is non-zero then fix the 0's in $\binom{9}{3}$.Select the non-zero repeated one in 6 ways,  then fix the one repeated twice in $\binom{7}{2}$ and the chose permutation of remaining 5 elements in 5! ways to get 1270080 ways.
all three are different:
All of the repeated ones are non-zero. first chose position of the zero in 9 ways.Chose the repeated digits in $\binom{3}{6}$ ways. pick positions for the three pairs of repeated numbers in $\frac{\binom{9}{2}*\binom{7}{2}*\binom{5}{2}}{6}$ ways and find the 6 possible permutations for each color in each pair. Then fix the permutation of the remaining 3 elements in 3! to get 48988800
One of the repeated digits is 0. first fix the zeroes in $\binom{2}{9}$. Then pick the other two pairs of digits in $\binom{2}{6}$. Pick the two pairs of positions in $\binom{2}{8}*\binom{2}{6}$ multiply by 2 so that each of the digits can get each of the pairs.Finally permute the remaining 4 elements in 4! ways to get 362880 ways
add them all up to get $60,782,400$ out of the $242,121,642$
A: Hint:  the number of 10-digit numbers missing $5$ is $5\cdot 6^9$, using the same logic as you did-you have six digits and the first can't be zero.  You can subtract these off from your figure of $6\cdot 7^9$, with some care for zero-it is different.  Unfortunately, you have subtracted off the ones missing both $4$ and $5$ twice, so need to add them back in.  This is a case of the inclusion-exclusion principle 
Maybe the exponent should be $6$, not $9$, as a $10$ digit number in base $7$ looks like $1234560$?
A: Say this number is $S_7^{10}$, and let $D_7^{10} = 6\cdot7^9$ be the total number of $10$-digits numbers in base 7. Then you have that
$$
S_7^{10} = D_7^{10}-7\cdot S_6^{10} \\
= 7^{10}-7\cdot(D_6^{10} - 6\cdot S_6^{10}) \\
= \dots
$$
The summation is not very clean, but you get the number!
A: Assume for the moment that a zero ($7$ in the following) at the first place is allowed. Then we have to count the number of surjective functions $f:\>[10]\to[7]$, where $[n]$ denotes the set $\{1,2,\ldots, n\}$. Any such $f$ can be generated by first partitioning the set $[10]$ into $7$ nonempty blocks and then assigning injectively a value from $[7]$ to each of these blocks. The first part can be done in $S(10,7)=5880$ ways, where $S(n,k)$ denotes the Stirling numbers of the second kind, and the second part in $7!=5040$ ways. By symmetry, one seventh of the functions so generated has $f(1)=7$, which is forbidden. It follows that the total number $N$ of admissible functions of the considered kind is given by
$$N={6\over7}\cdot 5880\cdot 5040=25\,401\,600\ .$$
