Codeforces Round 818 (Div. 2)
E
Madoka and The Best University
Codeforces
2200
原题
← DF →
翻译中…

Madoka wants to enter to "Novosibirsk State University", but in the entrance exam she came across a very difficult task:

翻译中…

Given an integer $n$, it is required to calculate $\sum{\operatorname{lcm}(c, \gcd(a, b))}$, for all triples of positive integers $(a, b, c)$, where $a + b + c = n$.

翻译中…

In this problem $\gcd(x, y)$ denotes the greatest common divisor of $x$ and $y$, and $\operatorname{lcm}(x, y)$ denotes the least common multiple of $x$ and $y$.

翻译中…

Solve this problem for Madoka and help her to enter to the best university!

翻译中…

Input

翻译中…

The first and the only line contains a single integer $n$ ($3 \le n \le 10^5$).

翻译中…

Output

翻译中…

Print exactly one interger — $\sum{\operatorname{lcm}(c, \gcd(a, b))}$. Since the answer can be very large, then output it modulo $10^9 + 7$.

翻译中…

Note

翻译中…

In the first example, there is only one suitable triple $(1, 1, 1)$. So the answer is $\operatorname{lcm}(1, \gcd(1, 1)) = \operatorname{lcm}(1, 1) = 1$.

翻译中…

In the second example, $\operatorname{lcm}(1, \gcd(3, 1)) + \operatorname{lcm}(1, \gcd(2, 2)) + \operatorname{lcm}(1, \gcd(1, 3)) + \operatorname{lcm}(2, \gcd(2, 1)) + \operatorname{lcm}(2, \gcd(1, 2)) + \operatorname{lcm}(3, \gcd(1, 1)) = \operatorname{lcm}(1, 1) + \operatorname{lcm}(1, 2) + \operatorname{lcm}(1, 1) + \operatorname{lcm}(2, 1) + \operatorname{lcm}(2, 1) + \operatorname{lcm}(3, 1) = 1 + 2 + 1 + 2 + 2 + 3 = 11$

翻译中…

样例

Input #1
3
Output #1
1
InputCopy OutputCopy
Input #2
5
Output #2
11
InputCopy OutputCopy
Input #3
69228
Output #3
778304278
InputCopy OutputCopy
题目信息
题号
1717E
时间限制
1 s
内存限制
256 MB
标签
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。