For any prime $p$ the number $N(p,q)$ is defined by $N(p,q) = \sum_{n=0}^q T_n \times p^n$ with $T_n$ generated by the following random number generator:
$$\begin{align}
& S_0 = 290797 \\
& S_{n + 1} = {S_n}^2\bmod 50\,515\,093 \\
& T_n = S_n\bmod p
\end{align}$$
Let $Nfac(p,q)$ be the factorial of $N(p,q)$.
Let $NF(p,q)$ be the number of factors $p$ in $Nfac(p,q)$.
You are given that $NF(3,10000) \bmod 3^{20} = 624\,955\,285$.
Find $NF(61,{10}^7)\bmod {61}^{10}$.