Given $n$ independent geometric random variables $X_n$, each with probability parameter $p$, define $$Z_n= \max_{i \in 1 .. n}X_n$$
I am interested in what the mle of $n$ is given $Z_n$, with known and fixed $p$.
We can give a good approximation for the mean of $Z_n$.
$$Z_n \approx \frac{1}{2} + \frac{1}{\lambda} H_n,$$ where $H_n$ is the $n$th harmonic number $H_n = \sum_{k=1}^n \frac{1}{k}$, and $\lambda = -\log (1-p)$. (See https://math.stackexchange.com/a/26214/72724)
I am not sure where to go from here.
Given that $p_{X}(x) = p \cdot (1 - p)^{x - 1}, \ x \in \{ 1, 2, \dots \}$, $F_{X}(x) = \mathbb{P}(X \le x) = \sum\limits_{i=1}^x p \cdot (1 - p)^{i-1} = \sum\limits_{i=0}^{x-1} p \cdot (1 - p)^{i} = p \cdot \frac{1 - (1 - p)^{x}}{p} = 1 - (1 - p)^x$
$F_{\max\limits_{i \in 1 .. n}X_{n}}(x) = F_{X}(x)^n = (1 - (1 - p)^x)^n$
$p_{\max\limits_{i \in 1 .. n}X_{n}}(x) = (F_{X}(x)^n)^{\prime}_{x} = n \cdot (1 - (1 - p)^x) \cdot (1 - p)^x \cdot \ln(1 - p) = p_{Z_{n} | n}(x)$ - conditional pdf.
Let's take uniform apriory distribution on parameter n, because we don't have any preferences. So $p_{n}(x) \propto const $.
Apply Bayes Theorem: $p_{n | Z_{n}}(n) = \frac{p_{Z_{n} | n}(x) \cdot p_{n}(n)}{p_{n}(n)} \propto p_{Z_{n} | n}(x) \cdot p_{n}(n) = p_{Z_{n} | n}(x) \cdot const.$
So the max is attained when $p_{Z_{n} | n}$ is maximal by n. For a given value of $Z_{n}$ compute $p_{Z_{n} | n}(x)$ for different values of n and take argmax.