MathDB
2017 BMT Team 11

Source:

January 6, 2022
combinatoricsnumber theory

Problem Statement

Ben picks a positive number nn less than 20172017 uniformly at random. Then Rex, starting with the number 1 1, repeatedly multiplies his number by nn and then finds the remainder when dividing by 20172017. Rex does this until he gets back to the number 1 1. What is the probability that, during this process, Rex reaches every positive number less than 20172017 before returning back to 1 1?