Legendre equation and polynomials