You will have to experiment. I don't know anything about the efficiency of the particular LEDs you are using, or what brightness you would consider acceptable.
4k7 will give you about 5mA. Even that might be too bright.
You can, of course, calculate the power that will be dissipated in the series resistor: P=V^2/R
So, for a 24V supply, 3V forward voltage and a 4k7 resistor, you'll be dissipating less than 100mW. A 0.5W (or higher) rated resistor will be fine.