A random variable
X has a log series distribution if
f(k) = Pr[X = k] =  p^{k} / [ k ln( 1  p ) ],  for k = 1,... 

where
0 < p < 1.
The cumulative hypergeometric distribution function is therefore given
where
f is given above.
 double Log_Series_Cumulative_Distribution( int k, double p )
This function returns F(k) where F(k) is described above.
 double Log_Series_Point_Distribution( int k, double p )
This function returns f(k) where f(k) is described above.
 void Log_Series_Distribution_Tables( int size, double p, double* pr, double* cumulative )
This function returns f(k) where f(k) is described above for k = 0,...,n in the array pr and returns F(k) where F(k) is described above for k = 0,...,n in the array cumulative
.
C source code is available for these routines: