OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
FORMULA
a(n) == 2 (mod 8). - Hugo Pfoertner, Mar 29 2021
EXAMPLE
26 is in the sequence since it is the sum of two distinct odd squares as 1^2 + 5^2 = 1 + 25 = 26.
MATHEMATICA
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
PROG
(Python)
def aupto(limit):
s = [i*i for i in range(1, limit//2+1, 2) if i*i < limit]
s2 = set(a+b for i, a in enumerate(s) for b in s[i+1:] if a+b <= limit)
return sorted(s2)
print(aupto(738)) # Michael S. Branicky, Oct 26 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Dec 25 2020
STATUS
approved