%I #17 Oct 26 2021 16:50:35
%S 10,26,34,50,58,74,82,90,106,122,130,146,170,178,194,202,218,226,234,
%T 250,274,290,298,306,314,338,346,362,370,386,394,410,442,450,458,466,
%U 482,490,514,522,530,538,554,562,578,586,610,626,634,650,666,674,698,706,730,738
%N Sums of two distinct odd squares.
%H Michael S. Branicky, <a href="/A339977/b339977.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) == 2 (mod 8). - _Hugo Pfoertner_, Mar 29 2021
%e 26 is in the sequence since it is the sum of two distinct odd squares as 1^2 + 5^2 = 1 + 25 = 26.
%t Table[If[Sum[Mod[i, 2] Mod[n - i, 2] (Floor[Sqrt[i]] - Floor[Sqrt[i - 1]]) (Floor[Sqrt[n - i]] - Floor[Sqrt[n - i - 1]]), {i, Floor[(n - 1)/2]}] > 0, n, {}], {n, 800}] // Flatten
%o (Python)
%o def aupto(limit):
%o s = [i*i for i in range(1, limit//2+1, 2) if i*i < limit]
%o s2 = set(a+b for i, a in enumerate(s) for b in s[i+1:] if a+b <= limit)
%o return sorted(s2)
%o print(aupto(738)) # _Michael S. Branicky_, Oct 26 2021
%Y Cf. A010052, A016754, A004431.
%K nonn
%O 1,1
%A _Wesley Ivan Hurt_, Dec 25 2020
|