This is great, I wish I could find off the shelf LED candles that more closely approximate the real thing. I'd also like them to be taper candles on a little holder with a loop finger hole so I can grab it to investigate noises in the night.
There used to be a company that made 192 LED rechargeable candles which looked like real flames (when behind frosted glass). They have apparently stopped selling them because of all the cheaper ripoffs with fewer LED's and worse algorithms. The many LED flames look more realistic because the light source actually moves, rather than just varying in intensity. They had a bulb similar to the first link above. It's odd that the cheap LED lights don't use a better algorithm, a brownian motion or fractal algorithm with pseudorandom number generator designed for a long sequence before it repeats wouldn't raise the price, it just takes a little more time to implement.
The flicker effect is based on a linear feedback shift register function to provide a pseudo random effect.
https://github.com/linker3000/CandleFlameSim