Indicator LED directly to AC mains. Which method would you use?
The Cap has an impedance of 15K. Does the calculation of power loss and heat apply in the same way as with a 15K resistor?


No, the impedance of the capacitor is purely reactive. It dissipates no real power.

EDIT: as drawn the circuit does not work. You want this:







simulate this circuit &ndash; Schematic created using CircuitLab

The value of C1 must be chosen to limit the current to the correct value. 470nF gives a current of 21mA, which flows alternately through D1 and D2.

R2 serves to 'bleed off' the high voltage on C1 when the device is disconnected, to prevent the user from being shocked. R1 limits the current to C1, preventing a spark when the device is plugged in, and also protects C1 against brief voltage surges.