4) 32,7x1
5) 32,8x1
6) 32,9x1
7) 32,0x1
(for EACH of those 7, we get 6 different values for the third --> 7*6 = 42 ways)
Now, if we JUST choose 3 and 1, we get EIGHT ways (obviously):
1) 32,xx1
2) 34,xx1
3) 35,xx1
4) 36,xx1
5) 37,xx1
6) 38,xx1
7) 39,xx1
8) 30,xx1
So there are 8 * 42 = 336 ways to permute those middle three digits (no matter what you choose for the first and last)...
If you choose 1 as the last digit, then you can have any value from 3-7 (five values):
1) 3x,xx1
2) 4x,xx1
3) 5x,xx1
4) 6x,xx1
5) 7x,xx1
And you get the same for 9...so that's 2*5 * 336 = 3,360
On the other hand say you choose 3 as the last digit, then there is only FOUR choices for the first:
1) 4x,xx3
1) 5x,xx3
1) 6x,xx3
1) 7x,xx3
It will be similar for the case when the last digit is 5 and 7 --> 3*4 * 336 = 4,032.
So then just add up all of those possibilities (as I did above).