We recommend reading this documentation on pkgdown which renders math nicely.
https://pkg.mitchelloharawild.com/distributional/reference/dist_logarithmic.html
In the following, let \(X\) be a Logarithmic random variable with
parameter prob = \(p\).
Support: \(\{1, 2, 3, ...\}\)
Mean: \(\frac{-1}{\log(1-p)} \cdot \frac{p}{1-p}\)
Variance: \(\frac{-(p^2 + p\log(1-p))}{[(1-p)\log(1-p)]^2}\)
Probability mass function (p.m.f):
$$
P(X = k) = \frac{-1}{\log(1-p)} \cdot \frac{p^k}{k}
$$
for \(k = 1, 2, 3, \ldots\)
Cumulative distribution function (c.d.f):
The c.d.f. does not have a simple closed form. It is computed
using the recurrence relationship
\(P(X = k+1) = \frac{p \cdot k}{k+1} \cdot P(X = k)\)
starting from \(P(X = 1) = \frac{-p}{\log(1-p)}\).
Moment generating function (m.g.f):
$$
E(e^{tX}) = \frac{\log(1 - pe^t)}{\log(1-p)}
$$
for \(pe^t < 1\)