%I #27 Feb 03 2024 10:22:38
%S 1,12,24,60,84,120,240,360,420,672,840,1260,1680,2160,2520,3360,6720,
%T 7560,10080,15120,21840,27720,30240,50400,60480,65520,83160,98280,
%U 110880,131040
%N Numbers whose divisors can be partitioned into two disjoint sets without singletons whose harmonic means are both integers in a record number of ways.
%C The corresponding record values are 0, 1, 3, 10, 26, 198, 1093, 7035, 12391, 17625, ...
%C From _David A. Corneth_, Sep 25 2023: (Start)
%C By multiplying the denominator of the harmonic mean of a(n) by a(n) we get a partition over the divisors of m = a(n) where two expressions must be an integer at the same time. Let v1 and v2 be the of divisors of a(n) into two disjoint sets, |v1| and |v2| their length and h1 and h2 the sum of their respective reciprocals.
%C Let tau(m) be the number of divisors of m (cf. A000005) and sigma(m) be the sum of divisors of m (cf. A000203). Then by definition |v1|/h1 and |v2|/h2 are integers.
%C Multiply the numerators and denominators by m and we get (|v1|*m)/(h1*m) and (|v2|*m)/(h2*m) both integers. Furthermore h1*m and h2*m are integers and |v1| + |v2| = tau(m) and h1*m + h2*m = sigma(m).
%C Substituting |v2| = tau(m) - |v1| and h2*m = sigma(m) - h1*m in (|v2|*m)/(h2*m) we get (|v1|*m)/(h1*m) and ((tau(m) - |v1|) * m) / (sigma(m) - h1*m) are positive integers where tau(m) and sigma(m) are fixed and 2 <= |v1| <= tau(m)-2 and 3 <= h1 <= sigma(m) - 3 as the smallest possible sum of two divisors is 1 + 2 = 3
%C The resulting pairs (|v1|, h1*m) yield separate partition problems where one should be careful with the case (if it occurs) (2*|v1|, 2*h1*m) = (tau(n), sigma(n)). (End)
%e 12 is the smallest number whose set of divisors can be partitioned into two disjoint sets whose harmonic means are both integers: {1, 2, 3, 6} and {4, 12}.
%e 24 is the smallest number whose set of divisors can be partitioned into two disjoint sets whose harmonic means are both integers in three ways: ({3, 6}, {1, 2, 4, 8, 12, 24}), ({1, 3, 6}, {2, 4, 8, 12, 24}) and ({1, 2, 3, 6}, {4, 8, 12, 24}).
%e From _David A. Corneth_, Sep 25 2023: (Start)
%e For n = 24 we have tau(n) = tau(24) = 8 and sigma(n) = sigma(24) = 60.
%e Therefore we look for (|v1|*24) / (h1*24) and ((8-|v1|)*24) / (60 - h1*24) both integers. It turns out that the pairs (|v1|, 24*h1) in {(2, 12), (2, 24), (2, 48), (3, 36), (4, 12)} (omitting conjugates) give integers.
%e The divisors of 24 are 1, 2, 3, 4, 6, 8, 12, 24. (2, 12) gives the sum 4 + 8; a sum of two distinct divisors of 24 summing to 12. (2, 24) gives no solution, likewise (2, 48) does not. From (3, 36) we get 4 + 8 + 24 and from (4, 12) we get 1 + 2 + 3 + 6.
%e And indeed these correspond to 2/(8/24 + 4/24) = 2/(1/3 + 1/6), 3/(24/24 + 8/24 + 4/24) = 3/(1 + 1/3 + 1/6) and 4/(24/24 + 12/24 + 8/24 + 4/24) = 4/(1 + 1/2 + 1/3 + 1/6). (End)
%t q[d_] := Length[d] > 1 && IntegerQ@HarmonicMean[d]; c[n_] := Count[Subsets[(d = Divisors[n])], _?(q[#] && q[Complement[d, #]] &)]/2; cm = -1; s = {}; Do[If[(c1 = c[n]) > cm, cm = c1; AppendTo[s, n]], {n, 1, 240}]; s
%o (Python)
%o from fractions import Fraction
%o from itertools import count, islice, combinations
%o from sympy import divisors
%o def A348716_gen(): # generator of terms
%o c = 0
%o yield 1
%o for n in count(2):
%o divs = tuple(divisors(n, generator=True))
%o l, b = len(divs), sum(Fraction(1,d) for d in divs)
%o if l>=4 and 2**(l-1)-l>c:
%o m = sum(1 for k in range(2,(l-1>>1)+1) for p in combinations(divs,k) if not ((s:=sum(Fraction(1,d) for d in p)).denominator*k%(s.numerator) or (r:=b-s).denominator*(l-k)%(r.numerator)))
%o if l&1 == 0:
%o k = l>>1
%o m += sum(1 for p in combinations(divs,k) if 1 in p and not ((s:=sum(Fraction(1,d) for d in p)).denominator*k%(s.numerator) or (r:=b-s).denominator*k%(r.numerator)))
%o if m > c:
%o yield n
%o c = m
%o A348716_list = list(islice(A348716_gen(),5)) # _Chai Wah Wu_, Sep 24 2023
%Y Cf. A348715.
%K nonn,more
%O 1,2
%A _Amiram Eldar_, Oct 31 2021
%E a(11) from _Chai Wah Wu_, Sep 25 2023
%E a(12)-a(27) from _David A. Corneth_, Sep 25 2023
%E a(28)-a(30) from _Max Alekseyev_, Feb 03 2024
|