Solved by 0 people. Submitted 1 time.
A room is filled with \(n\) people, and each one of them is given a coin, which is initially on heads, and we denote each person by an index among \([\![1, n]\!]\). For every integer \(k \in [\![1, n]\!]\), each person must turn their coin if they are among the set \(\{k, 2k, 3k, \dots\}\).
Call \(f(n)\) the sum of every index such that the associated person have their coin on tails by the end of the process. What is \(f(10^{12}) \pmod {1 \; 000 \; 000 \; 007} \) ?
Log in to submit a solution.