recursive solution for linear least squares 3986514