Back to Freecodecamp

Problem 288: An enormous factorial

curriculum/challenges/english/blocks/project-euler-problems-201-to-300/5900f48d1000cf542c50ff9f.md

latest815 B
Original Source

--description--

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}$.

--hints--

enormousFactorial() should return 605857431263982000.

js
assert.strictEqual(enormousFactorial(), 605857431263982000);

--seed--

--seed-contents--

js
function enormousFactorial() {

  return true;
}

enormousFactorial();

--solutions--

js
// solution required