Computation of layered mixed potentials for the accurate and efficient analysis of periodic printed structures