The total number of 4 digit numbers that can be formed by using the digits 1,2,3,4,5,6 and 7 if at least one digit is repeated is