← Complete problem index

PROJECT EULER · #0952

Order Modulo Factorial

Statement only · SolvedOriginal problem ↗

Given a prime p and a positive integer n<p, let R(p,n) be the multiplicative order of p modulo n!.
In other words, R(p,n) is the minimal positive integer r such that

pr1(modn!)

For example, R(7,4)=2 and R(109+7,12)=17280.

Find R(109+7,107). Give your answer modulo 109+7.

Write-up coming later

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