Consider four blanks _ _ _ _ 7 is in thousand place, then 3 can be placed in any of the 3 places in 3 ways. Remaining two blanks can be filled with remaining eight digits in 8P2 ways. The number of numbers that have 7 is in thousand place is 3×8P2=168 Thousand place cannot be 0,7 and 3 , it can be filled with remaining 7 digits in 7 ways. In remaining 3 blanks, 7 and 3 can be arranged in 3 ways. Fourth blank can be filled in 7 ways. The number of numbers that are formed where 7 and 3 is not in thousand place is 7×3×7=147. Hence total required numbers =168+147=315.