OK. So really rough numbers.

750mW is what you need at the output. Assuming you get 75% efficiency from the buck so you need to put 1W into it. 1 Joule/sec or 0.016 Joules every 16ms.

Capacitor stores 0.5CV^2. Assuming 8V is the minimum input voltage to your regulator and the peak is 24V x 1.41 = ~34V.

Therefore absolute lowest cap size would be (assuming the worst case that the AC supply is instantly charging the cap only once a cycle and not actually powering):

0.016 = 0.5xCx34^2 - 0.5xCx8^2
C = ~30uF

But make it something like 100-220uF and you'll be fine but put it on a scope if you can. Best to keep the DC level fairly smooth if you can. Ripple isn't good for caps.

There are other rule of thumb formulas too that will give you the same sort of results. Things like C = load_current/(2*freq*ripple_voltage). That will give you 220uF for a 5V ish ripple.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)