For a positive number $n$, define $C(n)$ as the number of the integers $x$, for which $1 \lt x \lt n$ and$x^3 \equiv 1 \bmod n$.
When $n=91$, there are $8$ possible values for $x$, namely: $9, 16, 22, 29, 53, 74, 79, 81$.
Thus, $C(91)=8$.
Find the sum of the positive numbers $n \le 10^{11}$ for which $C(n)=242$.
This problem involves using number theory and modular arithmetic.
We first need to establish what $x^3 \equiv 1 \bmod n$ means. It means when $x^3$ is divided by $n$, the remainder is 1.
Since $x^3 \equiv 1\bmod n$, we can write $x^3 – 1 \equiv 0\bmod n$.
By factorizing $x^3 – 1$, we get:
$x^3 – 1 = (x-1)(x^2 + x + 1) = 0 \bmod n$.
So we need to find the solution for $x-1 = 0 \bmod n$ and $x^2 + x + 1 = 0 \bmod n$.
For $x-1 = 0 \bmod n$, 1 is a solution disregarding the constraint that $x$ cannot be 1, only remaining solutions must come from $x^2 + x + 1 = 0 \bmod n$.
Now, the problem can be re-interpreted as following: Find the sum of positive numbers $n \le 10^{11}$ such that the quadratic equation $x^2+x+1=0$ has 242 non-zero solutions modulo n.
In order to solve this problem efficiently, rather than checking each individual number to see how many possible x-values there are, it’s better to work out under what conditions there will be exactly 242 solutions.
For a certain moduli m, the equation f(x) = x^2+x+1 has two solutions (in case m is coprime with 3) or no solution (in case m is not co-prime with 3).
We need exactly 242 solutions. C(n) counts the number of solutions for all moduli dividing n. Henceforth we need to find a number n such that n has exactly 242 prime divisors and each of them is co-prime with 3.
The prime numbers which are co-prime with 3 are of the form 6n+1 or 6n-1.
242 prime divisors implies that n is the product of the first 242 primes of the form 6n+1 or 6n-1, for a total of 484 values of n, all under the limit 10^11.
Note: When solving such problems, one needs powerful programming languages like Python to calculate the sum. It is hard to get the exact sum by hand.
Your task will now be to code a program in Python (or another programming language) that generates the first 242 primes of the form 6n+1 or 6n-1 and multiplies them together. There will be 484 such n-values, and you will add them all up for your final answer.
This is a high-level solution and needs mathematical and coding skills to get to the final answer.
Notice: Primes that are 2 mod 3 are excluded, so you would sieve primes of the form 3n+2 and primes of the form 3n+1 separately. This requires some number theory background to observe and was crucial in lowering the space complexity for the prime sieve, which was necessary to run this on a personal computer.
I hope you find this explanation helpful.
More Answers:
At Least Four Distinct Prime Factors Less Than 100Cutting Squares
Modular Cubes, Part 1