← Complete problem index

PROJECT EULER · #0288

An Enormous Factorial

Statement only · SolvedOriginal problem ↗

For any prime p the number N(p,q) is defined by N(p,q)=n=0qTnpn
with Tn generated by the following random number generator:

S0=290797
Sn+1=Sn2mod50515093
Tn=Snmodp

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)mod320=624955285.

Find NF(61,107)mod6110.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.