#P1445. Counting Solutions of a Reciprocal Equation
Counting Solutions of a Reciprocal Equation
Counting Solutions of a Reciprocal Equation
Given a positive integer n, consider the equation:
$$\frac{1}{x}+\frac{1}{y}=\frac{1}{n!}$$
where n! denotes the factorial of n. It can be shown by algebraic manipulation that the equation is equivalent to:
$$ (x-n!)(y-n!)=(n!)^2 $$
The number of positive integer solutions (x,y) is equal to the number of positive divisors of \((n!)^2\). Your task is to compute that number modulo \(10^9+7\).
Note: You may use the fact that if the prime factorization of \(n!\) is \(n! = \prod_{p \le n} p^{e_p}\), then the number of positive divisors of \((n!)^2\) is \(\prod_{p \le n} (2e_p+1)\).
inputFormat
The input consists of a single integer n (n ≥ 1).
outputFormat
Output a single integer representing the number of solution pairs \((x,y)\) modulo \(10^9+7\).
sample
1
1