%I #43 Feb 16 2025 08:32:35
%S 50,65,85,125,130,145,170,185,200,205,221,250,260,265,290,305,338,340,
%T 365,370,377,410,442,445,450,481,485,493,500,505,520,530,533,545,565,
%U 578,580,585,610,625,629,680,685,689,697,730,740,745,754,765,785,793,800,820
%N Numbers that are the sum of 2 nonzero squares in exactly 2 ways.
%C Order and signs don't count. E.g. 50 = 5^2+5^2 = 7^2+1^2 (= (-5)^2+5^2, but that doesn't count as different).
%C A131574 is a subsequence. - _Zak Seidov_, Jan 31 2014
%C A025426(a(n)) = 2. - _Reinhard Zumkeller_, Feb 26 2015
%H Vincenzo Librandi, <a href="/A025285/b025285.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquareNumber.html">Square Number.</a>
%H G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~twosquares.en.html">Two squares</a>
%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F a(n) >= A007692(n) with equality only for n <= 16. - _Alois P. Heinz_, Mar 23 2023
%t selQ[n_] := Length[ Select[ PowersRepresentations[n, 2, 2], Times @@ # != 0 &]] == 2; Select[Range[1000], selQ] (* _Jean-François Alcover_, Oct 03 2013 *)
%o (Haskell)
%o a025285 n = a025285_list !! (n-1)
%o a025285_list = filter ((== 2) . a025426) [1..]
%o -- _Reinhard Zumkeller_, Feb 26 2015
%o (PARI) is(n)=sum(k=sqrtint((n-1)\2)+1,sqrtint(n-1), issquare(n-k^2))==2 \\ _Charles R Greathouse IV_, May 24 2016
%o (PARI) is(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)==4 \\ _Charles R Greathouse IV_, May 24 2016
%Y Cf. A025284, A025286, A025287, A025288, A025289, A025290, A025291, A025292, A025293, A025426.
%Y Cf. A007692.
%K nonn,changed
%O 1,1
%A _David W. Wilson_