gradient for numerator of diagonal 3rd order stats