Problem #359
Android 17
Let S(n) denote the number of x such that 1 \leq x < n and x^{23} \equiv 1 \pmod{n}.
For example, S(4) = 1 because 1^{23} \equiv 1 \pmod{4}, but 2^{23} \equiv 0 \pmod{4} and 3^{23} \equiv 3 \pmod{4}.
Let F(k) denote the number of n between 1 and 10^{18} such that S(n) = k.
Find the summation \sum_{n=10^9}^{\infty} F(n) \mod (10^9 + 7).