Assuming mains voltage = 220V, current through LED = 10mA, LED Vf = 1.4V and that you rectify and filter the AC using a capacitor, required resistance, R = [{(220 * √2) - 1.4}/(10/1000)] Ω = 30972.7 Ω = 30.9 kΩ. So, you can use 33kΩ and you'll get a current of [{{(220 * √2)-1.4}/(33000)} * 1000] mA = 9.39 mA
you can also bypass the rectify so that the circuit will be simple. also you have to follow the step above by tahmid...
Assuming mains voltage = 220V, current through LED = 10mA, LED Vf = 1.4V
R = [(220 - 1.4)/(10/1000)] Ω = 21860 Ω = 21.9 kΩ. so approximately 22KΩ will be fine
now the second part will be the power dissipation of the resistor
from ohms law we get power = IV, where I = 10mA and V = 218
then it follows that P = (10/1000) X 218 = 2.2
so power dissipation will be 2.2 watts, hence your resistor should be able to withstand this power. though a 5 watt will be prefered.
In that case you can not use a single resistor , you also have to add either a diode in series with the led or an anti-parallel diode across the led to protect it from reverse voltage.
No, you can not without a antiparallel diode, because the reverse voltage of LED is app. 5V. So your LED will exploded after the first halfwave of your AC voltage.
For lowering mains voltage to near leds voltage range, often is used parallel or serial link of resistor and capacitor. Capacitor lower voltage with his internal resistance, without heat, unlike if you use only resistor for that purpose. But current which pass through capacitor have reasonable limit for around 150mA.