making sure legcoeffs returns a vector of length n+1 as advertised.