|
|
A339977
|
|
Sums of two distinct odd squares.
|
|
1
|
|
|
10, 26, 34, 50, 58, 74, 82, 90, 106, 122, 130, 146, 170, 178, 194, 202, 218, 226, 234, 250, 274, 290, 298, 306, 314, 338, 346, 362, 370, 386, 394, 410, 442, 450, 458, 466, 482, 490, 514, 522, 530, 538, 554, 562, 578, 586, 610, 626, 634, 650, 666, 674, 698, 706, 730, 738
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|