login
Nonsquare numbers which are the sum of 2 distinct squares.
3

%I #18 Apr 20 2023 08:58:53

%S 5,10,13,17,20,26,29,34,37,40,41,45,50,52,53,58,61,65,68,73,74,80,82,

%T 85,89,90,97,101,104,106,109,113,116,117,122,125,130,136,137,145,146,

%U 148,149,153,157,160,164

%N Nonsquare numbers which are the sum of 2 distinct squares.

%C This is simply A001983 excluding the square numbers.

%C The squares of these numbers are also sums of two distinct nonzero squares. Including them gives A004431. - _Jean-Christophe Hervé_, Nov 11 2013

%e 5 = 4 + 1, and 5^2 = 16 + 9 ; 10 = 9 + 1, and 10^2 = 64 + 36. - _Jean-Christophe Hervé_, Nov 11 2013

%t selQ[n_] := !IntegerQ[Sqrt[n]] && Select[ PowersRepresentations[n, 2, 2], 0 <= #[[1]] < #[[2]]&] != {};

%t Select[Range[1000], selQ] (* _Jean-François Alcover_, Apr 20 2023 *)

%Y Cf. A001983, A004431.

%K easy,nonn

%O 1,1

%A Rob Hubbard (hubbard.r(AT)gmail.com), Oct 08 2007

%E Definition corrected by _Jean-Christophe Hervé_, Nov 11 2013