Generating Functions for Lacunary Legendre and Legendre-like Polynomials