#P3766. Sum of Perfect Power Representations Ratio

    ID: 17016 Type: Default 1000ms 256MiB

Sum of Perfect Power Representations Ratio

Sum of Perfect Power Representations Ratio

Given a positive integer n, let \(g(n)\) denote the number of distinct representations of \(n\) as a perfect \(k\text{-th}\) power (with \(k>1\)). For example, \(64 = 2^6 = 4^3 = 8^2\), so \(g(64)=3\).

Define the function \[ f(n)=\sum_{i=2}^{n}\frac{g(i)}{i}, \] compute and output \(f(n)\) rounded to six decimal places.

inputFormat

The input consists of a single integer \(n\) (\(n \ge 2\)).

outputFormat

Output the value of \(f(n)\) as defined above, rounded to six decimal places.

sample

10
0.486111