  For fixed positive integers $n$, we study the solution of the equation $n = k
+ p_k$, where $p_k$ denotes the $k$th prime number, by means of the iterative
method \[ k_{j+1} = \pi(n-k_j), \qquad k_0 = \pi(n), \] which converges to the
solution of the equation, if it exists. We also analyze the equation $n = ak +
bp_k$ for fixed integer values $a \ne 0$ and $b>0$, and its solution by means
of a corresponding iterative method. The case $a>0$ is somewhat similar to the
case $a=b=1$, while for $a<0$ the convergence and usefulness of the method are
less satisfactory. The paper also includes a study of the dynamics of the
iterative methods.
