How to check if number is harmonic divisor or not

95 Views Asked by At

I need to write a program which checks if the given number is harmonic divisor or not. So I search on the internet and found a definition of it but couldn't understand really what is harmonic divisor.

This is what I found : https://archive.lib.msu.edu/crcmath/math/math/h/h085.htm

There is some functions in the given link. d() and something like q() (I couldn't type that char). I don't know what this functions are.

Thanks for any help or explanation.

(note: I don't know if sharing link is allowed on this site. If it is not allowed please warn me. I will edit the question.)

1

There are 1 best solutions below

0
On BEST ANSWER

The harmonic divisor numbers are OEIS sequence A001599 $$ 1, 6, 28, 140, 270, 496, 672, 1638, 2970, 6200, 8128, 8190,\dots $$ The Wikipedia article Harmonic divisor number states:

In mathematics, a harmonic divisor number, [...], is a positive integer whose divisors have a harmonic mean that is an integer.

It also states:

The harmonic mean $\,H(n)\,$ of the divisors of any number $\,n\,$ can be expressed as the formula $$ H(n) = \frac{n\,\sigma_0(n)}{\sigma_1(n)} $$ where $\,\sigma_i(n)\,$ is the sum of the $i$th powers of the divisors of $\,n:\sigma_0\,$ is the number of divisors, and $\,\sigma_1\,$ is the sum of the divisors (Cohen 1997).

and this:

$$ H(4) = \frac{3}{1+\frac12+\frac14} = 12/7, $$ $$ H(5) = \frac{2}{1+\frac15} = 5/3, $$ $$ H(7) = \frac{2}{1+\frac17} = 7/4, $$ and $$ H(140) = H(4\cdot 5\cdot 7) = H(4)\cdot H(5)\cdot H(7) = \frac{12}7 \cdot \frac53 \cdot \frac74 = 5. $$