Long Long Long Game Again
Source: 2023 Japan TST p8
July 21, 2023
number theory
Problem Statement
A and B are playing a game on a blackboard. At the beginning, a positive real number is fixed. First, A chooses a prime number greater than or equal to . Then, B selects non-negative real numbers and . A then chooses two integers and such that and , and writes on the blackboard the remainders of , , , and when divided by in this order.After that, A can repeatedly choose one of the following three operations as many times as they like:
[*] Choose an integer between and inclusive, and replace each of the four numbers on the blackboard with the remainder of adding and then dividing by .
[*] Choose an integer between and inclusive, and replace each of the four numbers on the blackboard with the remainder of multiplying by and then dividing by .
[*] Replace each of the four numbers on the blackboard with its remainder when squared and then divided by , but this operation is not allowed if at least one of the four numbers is .A's objective is to make the numbers on the blackboard become , , , and in that order. However, if there are no integers and that satisfy and , then A cannot achieve the objective.Find the maximum possible value of such that regardless of A's actions, B can always prevent A from achieving the objective.