An Arduino output puts-out 5V (when on/high) at 40mA or less.

Using

Ohm's Law we can calculate the minimum allowable resistance (for the maximum 40mA current): 5V/0.040A = 125 Ohms.

So that's a minimum resistor value of 109 Ohms.

Note that most of the energy will be wasted in the resistor so you may not get enough volume.

P.S.5V/16 Ohms = 313mA. If you were to connect the 16 Ohm speaker directly, you'd

*probably* get less than 5V out, so the current would be less than calculated but the Arduino might overheat and die!