4130 KX=(2*NXX-IB)*(IB-1)/2