OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..682 (terms below 10^14)
EXAMPLE
140 is a term because 140*(140-tau(140))/sigma(140) = 140*(140-12)/336 = 160/3.
MATHEMATICA
Select[Range[10^5], And[IntegerQ@ HarmonicMean@ #4, ! IntegerQ[#1 (#1 - #2)/#3]] & @@ Append[{#}~Join~DivisorSigma[{0, 1}, #], Divisors@ #] &] (* Michael De Vlieger, Mar 30 2019 *)
PROG
(Magma) [n: n in [1..1000000] | IsIntegral((NumberOfDivisors(n) * n) / SumOfDivisors(n)) and not 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 28 2019
(Python)
from itertools import count, islice
from math import prod
from functools import reduce
from sympy import factorint
def A325022_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 n*n%s and not 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 28 2019
STATUS
approved