Note: This question was posted in MSE about two years ago but it not receive an answer. Hence posting in MO.
A positive integer is said to have square-sum divisors if it has at least two divisors whose sum is a perfect square.
- $6$ has square-sum divisors because its divisors are $(1,2,3,6)$ and $1 + 3 = 2^2$. Also $3 + 6 = 3^2$
- $10$ has no square-sum divisors since no two of its divisors $(1,2,5,10)$ add up to a square
Trivially, all multiples of $3, 8, 14, 20, 34, 35, 46, 55, 62, 94, 95, 130, 142, 143, 155, 158, ...$ have square-sum divisors.
Question: Let $f(n)$ be the number of positive integers $\le n$ which have square-sum divisors. What is the limiting value
$$ \lim_{n \to \infty}\frac{f(n)}{n} $$
Update 14-Jun-2021: For $n = 1.3 \times 10^{10}$, the ratio is $0.571284$ showing that the growth rate is extremely slow since the ratio had reached $0.57$ by $n = 4 \times 10^5$.
Sagemath code using extended skip list suggested by Mees de Vries.
n = f = 0
step = 10^5
target = f
skip = [3, 8, 14, 20, 34, 35, 46, 55, 62, 94, 95, 130, 142, 143, 155, 158,
194, 203, 254, 295, 299, 323, 334, 395, 398, 418, 430, 446, 473, 482]
while n < 10^30:
d = divisors(n)
l = len(d)
c = i = 0
stop = False
while i < l and stop == False:
j = i + 1
while j < l and stop == False:
if (d[i] + d[j])^0.5 %1 == 0:
c = 1
stop = True
j = j + 1
i = i + 1
if c == 0:
f = f + 1
if f >= target:
print(f,n,1 - f/n.n())
target = target + step
found = False
while found == False:
n = n + 1
if all(n%x != 0 for x in skip):
found = True