OFFSET
1,1
COMMENTS
These numbers are "square-sum-rich" and represent potential centers for a 3 X 3 magic square of distinct squares. Equivalent to n = (x^2 + y^2)/2 with at least 4 distinct pairs (x<y).
If k = Product_i p_i^e_i, where p_i are distinct primes, then k is a term if and only if Product_{i:p_i mod 4 == 1} 2*e_i+1 >= 9. If k is a term, then k*m is a term as well. A131574 is a subsequence. - Chai Wah Wu, Dec 01 2025
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
PROG
(Python)
import math
def count_pairs(n):
L = 2 * n**2
count = 0
for x in range(1, int(math.isqrt(L)) + 1):
y2 = L - x*x
y = int(math.isqrt(y2))
if y*y == y2 and y > x:
count += 1
return count
# Generate list of n ≤ MAX with ≥4 pairs
MAX = 1500
vals = [n for n in range(1, MAX+1) if count_pairs(n) >= 4]
print(vals)
(Python)
from math import prod
from itertools import count, islice
from sympy import factorint
def A391107_gen(startvalue=1): # generator of terms >= startvalue
for k in count(max(startvalue, 1)):
if prod((e<<1)|1 for p, e in factorint(k).items() if p&3==1)>=9:
yield k
CROSSREFS
KEYWORD
nonn
AUTHOR
Md. Rad Sarar Anando, Nov 29 2025
STATUS
approved
