OFFSET
1,2
COMMENTS
Numbers m such that m*tau(m)/sigma(m) is an integer g and simultaneously m*(m-tau(m))/sigma(m) is an integer h. Corresponding values of integers g: 1, 2, 3, 5, 8, 7, 24, 24, 44, 46, 54, 96, 80, 13, 96, ...
Corresponding values of integers h: 0, 1, 11, 243, 216, 4057, 7536, 8166, 76186, 166589, ...
Even perfect numbers from A000396 are terms.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..255 (terms below 10^14)
EXAMPLE
Harmonic number 28 is a term because 28*tau(28)/sigma(28) = 28*6/56 = 3 (integer) and simultaneously 28*(28-tau(28))/sigma(28) = 28*(28-6)/56 = 11 (integer).
MATHEMATICA
Select[Range[10^6], And[IntegerQ@ HarmonicMean@ #2, IntegerQ[#1 (#1 - #3)/#4]] & @@ Join[{#}, {Divisors@ #}, DivisorSigma[{0, 1}, #]] &] (* Michael De Vlieger, Mar 27 2019 *)
PROG
(Magma) [n: n in [1..1000000] | IsIntegral((NumberOfDivisors(n) * n) / SumOfDivisors(n)) and IsIntegral(((n-NumberOfDivisors(n)) * n) / SumOfDivisors(n))]
(PARI) isok(m) = my(d=numdiv(m), s=sigma(m)); !frac(m*d/s) && !frac(m*(m-d)/s); \\ Michel Marcus, Mar 27 2019
(Python)
from itertools import count, islice
from math import prod
from functools import reduce
from sympy import factorint
def A325021_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
f = factorint(n)
s = prod((p**(e+1)-1)//(p-1) for p, e in f.items())
if not (n*n%s or reduce(lambda x, y:x*y%s, (e+1 for e in f.values()), 1)*n%s):
yield n
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Mar 27 2019
STATUS
approved