Problem

Source: 2021 Dutch BxMO TST p3

Tags: combinatorics, number theory



Let $p$ be a prime number greater than $2$. Patricia wants $7$ not-necessarily different numbers from $\{1, 2, . . . , p\}$ to the black dots in the figure below, on such a way that the product of three numbers on a line or circle always has the same remainder when divided by $p$. (a) Suppose Patricia uses the number $p$ at least once. How many times does she have the number $p$ then a minimum sum needed? (b) Suppose Patricia does not use the number $p$. In how many ways can she assign numbers? (Two ways are different if there is at least one black one dot different numbers are assigned. The figure is not rotated or mirrored.)