projecteuler.net

Perfection Quotients

 Published on Saturday, 18th April 2009, 02:00 am; Solved by 847;
Difficulty rating: 80%

Problem 241

For a positive integer $n$, let $\sigma(n)$ be the sum of all divisors of $n$. For example, $\sigma(6) = 1 + 2 + 3 + 6 = 12$.

A perfect number, as you probably know, is a number with $\sigma(n) = 2n$.

Let us define the perfection quotient of a positive integer as $p(n) = \dfrac{\sigma(n)}{n}$.

Find the sum of all positive integers $n \le 10^{18}$ for which $p(n)$ has the form $k + \dfrac{1}{2}$, where $k$ is an integer.