Given the set $\{1,2,3,4,5,6,7\}$.
We would like to create a string of size 8 so that each of the elements of the set appears at least once in the result. How many ways are there to create such a set?
I think that the answer should be: order 7 elements $7!$ and chose 1 number out of 7 to reappear and chose a position out of 8 available.
Am I correct? Or am I missing something?
First "decide" on the elements in the string. All seven elements are forced choices, and you have seven choices for the extra element, with only a single repetition. So: $7$ possibilities.
Next think about the order. There are $8!$ ways of ordering eight distinct elements, but there is a single repetition in each string in your problem (mutually swapping their positions won't affect the string). So you need to divide by $2!$ to compensate.
Answer = $7\cdot \frac{8!}{2!}=141120$