All three, look at trapper's post. Both b2 and b3 are conutrients of selen and iodine, and mangnesium is a master mineral that is needed no matter what.
Mg sulfate is one of the cheapest sources.
I prefer it externally.
Mg taurate (douglas labs) gives me the least side effects and really helps internally. I always take a little extra when I get a headache (classic migraine relief in magnesium. )
Optimox is preferable for the b2/b3, 100-500mg ratio, just simplifies things down into one pill and the right formulations. No laws about what brands you pick.
I like jarrow formulas B-right on the side to cover the fuller body of b-vits.. but it is low on the riboflavin and niacin (b2 and b3) in comparison to optimoxes' product.
Magnesium and b-vits compliment eachother and work together. B-vits alone can give a bit of a blood Sugar rise (b-vits+magnesium stops this effect), Mg alone puts folk often to sleep (mg + b's ease up this effect)
B-vits and magnesium occur together naturally in green foods (!!)
Trapper's the head Iodine guy, but lets folk search/browse the Iodine VWT team forum histories to get the info. Much more gratifying for the searcher. ;)