From 1 to 9999, how many permutations are there in the combination of the three numbers 123? How many numbers with 123, 213 or 321 can appear in 9999? The position is unlimited, and the form can also be: 0123, 1123, 1233, 1234. Please give the calculation method? There are 123 disjoint permutations, such as 1023, 1203, 3120 or 9123, 1293, etc. How many permutations can there be in 9999?

From 1 to 9999, how many permutations are there in the combination of the three numbers 123? How many numbers with 123, 213 or 321 can appear in 9999? The position is unlimited, and the form can also be: 0123, 1123, 1233, 1234. Please give the calculation method? There are 123 disjoint permutations, such as 1023, 1203, 3120 or 9123, 1293, etc. How many permutations can there be in 9999?

This topic can be considered as follows:
There are four positions, three of them for 123
The arrangement of 123 is: 3 * 2 * 1 = 6
Another location is 0 4 5 6 7 8 9,
So multiply that by seven
Finally, 6 * 7 = 42