There are (7!)/(7-4)! = 7*6*5*4 permutations of 7 numbers taken 4 at a time. That's 840. Some of the numbers will have a leading zero.

If you don't allow a leading zero, there are 6*6*5*4 = 720 possible 4-digit numbers.

The first couple are 0123, 0124, ...

The last couple are ..., 6542, 6543.

The set of numbers not having leading zeros begins with 1023, 1024, ...

If you don't allow a leading zero, there are 6*6*5*4 = 720 possible 4-digit numbers.

The first couple are 0123, 0124, ...

The last couple are ..., 6542, 6543.

The set of numbers not having leading zeros begins with 1023, 1024, ...