Supersingular elliptic curves and congruences for legendre polynomials