static double zetastatic(long st,long n,double theta,double initialsum){
  double sum=initialsum;
  for (long i=st; i < n; i++) {
    sum+=1 / (Math.pow(i + 1,theta));
  }
  return sum;
}

static double zetastatic ( long st , long n , double theta , double initialsum ) { double sum = initialsum ; for ( long i = st ; i < n ; i ++ ) { sum += 1 / ( Math . pow ( i + 1 , theta ) ) ; } return sum ; }
compute the zeta constant needed for the distribution . do this incrementally for a distribution that has n items now but used to have st items . use the zipfian constant theta . remember the new value of n so that if we change the itemcount , we ' ll know to recompute zeta .
