cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348716 Numbers whose divisors can be partitioned into two disjoint sets without singletons whose harmonic means are both integers in a record number of ways.

This page as a plain text file.
%I A348716 #27 Feb 03 2024 10:22:38
%S A348716 1,12,24,60,84,120,240,360,420,672,840,1260,1680,2160,2520,3360,6720,
%T A348716 7560,10080,15120,21840,27720,30240,50400,60480,65520,83160,98280,
%U A348716 110880,131040
%N A348716 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 A348716 The corresponding record values are 0, 1, 3, 10, 26, 198, 1093, 7035, 12391, 17625, ...
%C A348716 From _David A. Corneth_, Sep 25 2023: (Start)
%C A348716 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 A348716 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 A348716 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 A348716 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 A348716 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 A348716 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 A348716 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 A348716 From _David A. Corneth_, Sep 25 2023: (Start)
%e A348716 For n = 24 we have tau(n) = tau(24) = 8 and sigma(n) = sigma(24) = 60.
%e A348716 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 A348716 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 A348716 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 A348716 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 A348716 (Python)
%o A348716 from fractions import Fraction
%o A348716 from itertools import count, islice, combinations
%o A348716 from sympy import divisors
%o A348716 def A348716_gen(): # generator of terms
%o A348716     c = 0
%o A348716     yield 1
%o A348716     for n in count(2):
%o A348716         divs = tuple(divisors(n, generator=True))
%o A348716         l, b = len(divs), sum(Fraction(1,d) for d in divs)
%o A348716         if l>=4 and 2**(l-1)-l>c:
%o A348716             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 A348716             if l&1 == 0:
%o A348716                 k = l>>1
%o A348716                 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 A348716             if m > c:
%o A348716                 yield n
%o A348716                 c = m
%o A348716 A348716_list = list(islice(A348716_gen(),5)) # _Chai Wah Wu_, Sep 24 2023
%Y A348716 Cf. A348715.
%K A348716 nonn,more
%O A348716 1,2
%A A348716 _Amiram Eldar_, Oct 31 2021
%E A348716 a(11) from _Chai Wah Wu_, Sep 25 2023
%E A348716 a(12)-a(27) from _David A. Corneth_, Sep 25 2023
%E A348716 a(28)-a(30) from _Max Alekseyev_, Feb 03 2024