The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339952 Numbers that are the sum of an even square > 0 and an odd square. 2
5, 13, 17, 25, 29, 37, 41, 45, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 117, 125, 137, 145, 149, 153, 157, 169, 173, 181, 185, 193, 197, 205, 221, 225, 229, 233, 241, 245, 257, 261, 265, 269, 277, 281, 289, 293, 305, 313, 317, 325, 333, 337, 349, 353, 365, 369, 373, 377 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
13 is in the sequence since it is the sum of an even square > 0 and an odd square, 2^2 + 3^2 = 4 + 9 = 13.
MATHEMATICA
Table[If[Sum[Sign[(Mod[i, 2] Mod[n - i + 1, 2] + Mod[i + 1, 2] Mod[n - i, 2])] (Floor[Sqrt[i]] - Floor[Sqrt[i - 1]]) (Floor[Sqrt[n - i]] - Floor[Sqrt[n - i - 1]]), {i, Floor[n/2]}] > 0, n, {}], {n, 500}] // Flatten
PROG
(Python)
def aupto(limit):
m = int(limit**.5) + 2
es = [i*i for i in range(2, m, 2)]
os = [i*i for i in range(1, m, 2)]
return sorted(set(a+b for a in es for b in os if a+b <= limit))
print(aupto(377)) # Michael S. Branicky, May 13 2021
CROSSREFS
Sequence in context: A105596 A037046 A126887 * A087445 A020882 A081804
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Dec 24 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 26 09:40 EDT 2024. Contains 372824 sequences. (Running on oeis4.)