gp find the number of terms required for 1 by 1000