Find all $f$ such that $X\sim\mathcal{G}(\lambda) \;\Rightarrow\; f(X)\sim \mathcal{G}(\mu)$ I found a nice problem recently, but could not come up with a solution:
Find all functions $f:\mathbb{Z}_{\geq 0}\to\mathbb{Z}_{\geq 0}$ such that for all $0< \lambda < 1$, if $X\sim G(\lambda)$, then there exists $0<\mu < 1$ with $f(X) \sim G(\mu)$.
Thanks to the answers below, I was able to understand how to solve it!
Spoiler: the solutions are all the functions $f_d:x\mapsto \lfloor x/d\rfloor$ for a fixed $d\geq 1$.
 A: Below are only proofs of the known results from the question, which is a characterization of all non-decreasing $f$.
For $\lambda\in[0,1]$ let $G(\lambda)$ denote the geometric distribution, that is the distribution of the number of failures before the first success in a Bernoulli trial given by
$$\mathbb P(X_\lambda=k)=(1-\lambda)^{k}\lambda$$
for $k\in\mathbb Z_{\ge 0}$, where $X_\lambda\sim G(\lambda)$.
Let $\mathcal F=\{f:\mathbb Z_{\ge 0}\rightarrow\mathbb Z_{\ge 0}: \forall\lambda\in(0,1)\exists\mu\in(0,1)\,f(X_\lambda)\sim G(\mu)\}$.
For $f\in\mathcal F$ and $\lambda\in(0,1)$ let $\mu_\lambda\in(0,1)$ be such that $f(X_\lambda)\sim G(\mu_\lambda)$. Notice that $\mu_\lambda=\mathbb P(f(X_\lambda)=0)=\sum_{k\in f^{-1}(0)}(1-\lambda)^k\lambda$ is determined by $f$ and $\lambda$.
Claim 1: Each $f\in\mathcal F$ is surjective.
Proof: For $k\in\mathbb Z_{\ge 0}$ we have $\mathbb P(X_\lambda\in f^{-1}(k))=\mathbb P(f(X_\lambda)=k)=\mathbb P(X_{\mu_\lambda}=k)>0$ and hence $f^{-1}(k)\neq\emptyset$.
Claim 2: For $f\in\mathcal F$ we have $f(0)=0$ and $\mu_\lambda\ge\lambda$, where $f(X_\lambda)\sim G(\mu_\lambda)$ for $\lambda\in(0,1)$.
Proof:
We have $(1-\mu_\lambda)^{f(0)}\mu_\lambda=\mathbb P(f(X_\lambda)=f(0))\ge\mathbb P(X_\lambda=0)=\lambda$. For $a\in\mathbb R_{\ge 0}$ and $g:[0,1]\rightarrow[0,1]$, $x\mapsto (1-x)^ax$ we have $g'(x)=(1-x)^a-a(1-x)^{a-1}x$ and thus a unique maximum at $x=\frac{1}{a+1}$, yielding $(1-\frac{1}{f(0)+1})^{f(0)}\frac{1}{f(0)+1}\ge (1-\mu_\lambda)^{f(0)}\mu_\lambda\ge\lambda$. Since this holds for all $\lambda\in(0,1)$, we have $1\ge(1-\frac{1}{f(0)+1})^{f(0)}\ge f(0)+1$, thereby $f(0)\le 0$ and hence $f(0)=0$. Substituting this in the first inequality gives $\mu_\lambda\ge\lambda$.
Claim 3: Let $d=\inf\{k\in\mathbb Z_{\ge 0}:f(k)=1\}$ for $f\in\mathcal F$. Then we have $d\in\mathbb Z_{>0}$ and $\lim_{\lambda\rightarrow 1}\frac{1-\mu_\lambda}{(1-\lambda)^d}=1$.
Proof: We have $d<\infty$ by Claim 1 and $d>0$ by Claim 2, so $d\in\mathbb Z_{>0}$. Further, we have $(1-\mu_\lambda)\mu_\lambda=\mathbb P(f(X_\lambda)=1)=\mathbb P(X_\lambda\in f^{-1}(1))=(1-\lambda)^d\lambda\sum_{k\in f^{-1}(1)}(1-\lambda)^{k-d}$, which yields
$$
\frac{1-\mu_\lambda}{(1-\lambda)^d}=\frac{\lambda}{\mu_\lambda}\sum_{k\in f^{-1}(1)}(1-\lambda)^{k-d}.
$$
Using the geometric series we have $1\le\sum_{k\in f^{-1}(1)}(1-\lambda)^{k-d}\le\frac{1}{\lambda}$, and further $\lambda\le\mu_\lambda\le 1$ using Claim 2, so we indeed obtain $\lim_{\lambda\rightarrow 1}\frac{1-\mu_\lambda}{(1-\lambda)^d}=1$.
Claim 4: For $f\in\mathcal F$ and $n\in\mathbb Z_{\ge 0}$ we have $dn=\min\{k\in\mathbb Z_{\ge 0}:f(k)=n\}$.
Proof: Notice that $m(n)=\min\{k\in\mathbb Z_{\ge 0}:f(k)=n\}$ is well-defined by Claim 1, that we have $m(0)=0$ by Claim 2, and that $m(1)=d$ trivially holds, so let $n\in\mathbb Z_{>1}$. Notice that
\begin{align*}
(1-\mu_\lambda)^{n}\mu_\lambda
&=\mathbb P(f(X_\lambda)=n)=\mathbb P(X_\lambda\in f^{-1}(n))=\sum_{k\in f^{-1}(n)}(1-\lambda)^k\lambda\\
&=(1-\lambda)^{m(n)}\lambda\sum_{k\in f^{-1}(n)}(1-\lambda)^{k-m(n)}.
\end{align*}
As before, we have $1\le\sum_{k\in f^{-1}(n)}(1-\lambda)^{k-m(n)}\le\frac{1}{\lambda}$, so with Claim 2 and Claim 3 we have $\lim_{\lambda\rightarrow 1}(1-\lambda)^{dn-m(n)}=1$ since
\begin{align*}
(1-\lambda)^{dn-m(n)}
&=\left(\frac{(1-\lambda)^d}{1-\mu_\lambda}\right)^n
\frac{\lambda\sum_{k\in f^{-1}(n)}(1-\lambda)^{k-m(n)}}{\mu_\lambda}\frac{(1-\mu_\lambda)^n\mu_\lambda}{(1-\lambda)^{m(n)}\lambda\sum_{k\in f^{-1}(n)}(1-\lambda)^{k-m(n)}}\\
&=\left(\frac{(1-\lambda)^d}{1-\mu_\lambda}\right)^n
\frac{\lambda\sum_{k\in f^{-1}(n)}(1-\lambda)^{k-m(n)}}{\mu_\lambda}.
\end{align*}
Since $dn-m(n)$ does not depend on $\lambda$, this implies that $dn=m(n)$.
Now, we restrict to non-decreasing functions. Let $\mathcal F_+=\{f\in\mathcal F:\forall n\le n'\,f(n)\le f(n')\}$.
Claim 5: For $d\in\mathbb Z_{>0}$ let $f_d:\mathbb Z_{\ge 0}\rightarrow\mathbb Z_{\ge 0}$, $k\mapsto\lfloor\frac{k}{d}\rfloor$. We have $\mathcal F_+=\{f_d:d\in\mathbb Z_{>0}\}$.
Proof: Let $f\in\mathcal F_+$ and $d\in\mathbb Z_{>0}$ as defined in Claim 3. Since $f$ is non-decreasing, Claim 4 directly implies $f=f_d$.
Conversely, for $d\in\mathbb Z_{>0}$ the map $f_d$ is clearly non-decreasing. We further have $\mu_\lambda=\sum_{k=0}^{d-1}(1-\lambda)^k\lambda=1-(1-\lambda)^d$.
Further, we have $\mathbb P(f(X_\lambda)=n)=\sum_{k=dn}^{d(n+1)-1}(1-\lambda)^k\lambda=(1-\lambda)^{dn}\mu_\lambda=(1-\mu_\lambda)^n\mu_\lambda$ and thus $f(X_\lambda)\sim G(\mu_\lambda)$.
