login
Integers x such that there exist two integers 0<x<=y and z>0 such that sigma(x)*psi(x) = sigma(y)*psi(y) = x^2 + y^2 + z^2.
1

%I #17 May 17 2026 21:51:45

%S 2,130144,293760,1705264,1977120,2201280,6082560,7012096,15467520

%N Integers x such that there exist two integers 0<x<=y and z>0 such that sigma(x)*psi(x) = sigma(y)*psi(y) = x^2 + y^2 + z^2.

%C The numbers x, y and z form a sigma*psi-quadratic triple.

%H S. I. Dimitrov, <a href="https://hal.science/hal-05303937">On σψ-quadratic k-tuples and related generalizations</a>, hal-05303937, 2025.

%e (293760, 369792, 774144) is such a triple because sigma(293760) * psi(293760) = sigma(369792) * psi(369792) = 1101600 * 746496 = 293760^2 + 369792^2 + 774144^2.

%o (Python)

%o from sympy import divisors, factorint

%o from functools import lru_cache

%o from multiprocessing import Pool, cpu_count

%o from collections import defaultdict

%o from itertools import combinations_with_replacement

%o from math import isqrt

%o from fractions import Fraction

%o @lru_cache(maxsize=None)

%o def sigma(n: int) -> int:

%o return sum(divisors(n))

%o @lru_cache(maxsize=None)

%o def dedekind_psi(n: int) -> Fraction:

%o factors = factorint(n)

%o result = Fraction(n)

%o for p in factors:

%o result *= Fraction(p + 1, p)

%o return result

%o def process_n(n):

%o return n, sigma(n) * dedekind_psi(n)

%o def find_xyz_triplets(start, end):

%o with Pool(cpu_count()) as pool:

%o results = pool.map(process_n, range(start, end + 1))

%o groups = defaultdict(list)

%o for n, f in results:

%o groups[f].append(n)

%o triplets = []

%o for fval, nums in groups.items():

%o for x, y in combinations_with_replacement(nums, 2):

%o rhs_frac = fval - x*x - y*y

%o if rhs_frac.denominator == 1 and rhs_frac.numerator >= 0:

%o z = isqrt(rhs_frac.numerator)

%o if z*z == rhs_frac.numerator:

%o triplets.append((x, y, z))

%o return triplets

%o if __name__ == "__main__":

%o start = 1

%o end = 1000000

%o xyz_triplets = find_xyz_triplets(start, end)

%o for triplet in xyz_triplets:

%o print(triplet)

%Y Cf. A000203, A000408, A001615, A385356, A395670.

%K nonn,hard,more

%O 1,1

%A _S. I. Dimitrov_, May 05 2026