i am assuming repetition are allowed
see,
number will look like $a\ b\ c\ d$
fixing d as 5, you can get total of $4*4*4=64$ combinations for other 3 positions, now due to symmetry if you fix a,b,c at ones position, you will get also $64$ combinations
same thing will happen for tens, hundredth and thousands position.
now, since there are 4 types of figures at ones position each coming 64 times, sum at ones position=$(5+6+7+8)*64=1664$, 166 will go carry to next place.
for tens position $(5+6+7+8)*64 + 166(carry) = 1830$, 183 will go carry to next place.
for hundreds position $(5+6+7+8)*64 + 183(carry) = 1847$, 184 will go carry to next place
for thousands position $(5+6+7+8)*64 + 184(carry) = 1848$
total sum = 1848704