OFFSET
1,2
COMMENTS
This sequence lists the values of A000404(n)/2 when A000404(n) is an even number. In other words, sequence lists integers n that are the average of two nonzero squares. - Altug Alkan, May 26 2016
LINKS
FORMULA
A025435(a(n)) > 0. - Reinhard Zumkeller, Dec 20 2013
MATHEMATICA
upto=200; max=Floor[Sqrt[upto]]; s=Total/@((Subsets[Range[0, max], {2}])^2); Union[Select[s, #<=upto&]] (* Harvey P. Dale, Apr 01 2011 *)
selQ[n_] := Select[ PowersRepresentations[n, 2, 2], 0 <= #[[1]] < #[[2]] &] != {}; Select[Range[200], selQ] (* Jean-François Alcover, Oct 03 2013 *)
PROG
(Haskell)
a001983 n = a001983_list !! (n-1)
a001983_list = [x | x <- [0..], a025435 x > 0]
-- Reinhard Zumkeller, Dec 20 2013
(PARI) list(lim)=my(v=List()); for(x=0, sqrtint(lim\4), for(y=x+1, sqrtint(lim\1-x^2), listput(v, x^2+y^2))); Set(v) \\ Charles R Greathouse IV, Feb 07 2017
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved