OFFSET
1,3
COMMENTS
Contains all integers that are not equal to 2 (mod 4) (they are of the form y^2 - x^2) and those of the form 4k+2 = 2*(2k+1) with the odd number 2k+1 equal to the sum of two squares (A057653).
LINKS
Jean-Christophe Hervé, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
2 = 1^2 + 1^2, 3 = 2^2 - 1^2, 4 = 2^2 + 0^2, 5 = 2^2 + 1^2 = 3^2 - 2^2.
MATHEMATICA
r[n_] := Reduce[n == x^2 + y^2, {x, y}, Integers] || Reduce[0 <= y <= x && n == x^2 - y^2, {x, y}, Integers]; Reap[Do[If[r[n] =!= False, Sow[n]], {n, 0, 80}]][[2, 1]] (* Jean-François Alcover, Oct 25 2015 *)
PROG
(Python)
from itertools import count, islice
from sympy import factorint
def A263715_gen(): # generator of terms
return filter(lambda n: n & 3 != 2 or all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items()), count(0))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Christophe Hervé, Oct 24 2015
STATUS
approved