5. First, give two obvious conclusions:
(1) If m is a positive integer and x is a real number, then
[mx]=[m[x]];
(2) For any integer l and positive even number m, we have
[m2l+1]=[m2l].
Returning to the original problem.
In conclusion (1), let m=k!(k=1,2,⋯,2013), and summing up, we get
f(x)=k=1∑2013[k!x]=k=1∑2013[k![x]]=f([x]),
This shows that the equation f(x)=n has a real solution if and only if the equation f(x)=n has an integer solution.
From now on, we only need to consider the case where x is an integer.
By f(x+1)−f(x)=[x+1]−[x]+∑k=22013([k!x+1]−[k!x])⩾1,
we know that f(x)(x∈Z) is monotonically increasing.
Next, find integers a and b such that
f(a−1)2013,
so b=1173.
Therefore, the good numbers in {1,3,5,⋯,2013} are the odd numbers in {f(0),f(1),⋯,f(1173)}.
In equation (1), let x=2l(l=0,1,⋯,586), by conclusion (2) we know
[k!2l+1]=[k!2l](2⩽k⩽2013). Hence f(2l+1)−f(2l)=1+∑k=22013([k!2l+1]−[k!2l])=1,
This shows that f(2l) and f(2l+1) have exactly one odd number.
Thus, {f(0),f(1),⋯,f(1173)} contains exactly 21174=587 odd numbers, i.e., the set {1,3,5,⋯,2013} contains 587 good numbers.