All Tracks Math Problem

Delta functions
/

Algorithms, Basic Math, Math, Math Basic

Problem
Editorial
Analytics

You are given \(n\) and \(x \Delta y = \frac{x \times y}{\gcd(x, y) ^ 2}\).

Print the value of \(\sum_{i = 1}^{n} \sum_{j = 1}^n i \Delta j \mod (10^9 + 7)\).

Input format

  • First line: \(n\)

Output format

Print the value of \(\sum_{i = 1}^n \sum_{j = 1}^n i \Delta j \mod (10^9 + 7)\).

Constraints

\(1\le n\le10^{6}\)

SAMPLE INPUT
2
SAMPLE OUTPUT
6
Explanation

1 * 1 / 1 + 1 * 2 / 1 + 2 * 1 / 1 + 2 * 2 / 4 = 6.

Time Limit: 5.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

Best Submission

Similar Problems

Contributors

This Problem was Asked in

Initializing Code Editor...
Notifications
View All Notifications

?