Factorizing numbers with classical interference: several implementations in optics