login
Values of n such that there are exactly 2 solutions to x^2 - y^2 = n, with x > y >= 0.
10

%I #8 Apr 22 2015 09:31:59

%S 9,15,16,21,24,25,27,32,33,35,36,39,40,49,51,55,56,57,60,65,69,77,84,

%T 85,87,88,91,93,95,100,104,108,111,115,119,121,123,125,129,132,133,

%U 136,140,141,143,145,152,155,156,159,161,169,177,183,184,185,187,196

%N Values of n such that there are exactly 2 solutions to x^2 - y^2 = n, with x > y >= 0.

%C A subsequence of A058957. Terms in the latter but not here are 45, 48, 63, 64, 72, 75, 80, 81, 96, 99, ... - _M. F. Hasler_, Apr 22 2015

%H Colin Barker, <a href="/A257409/b257409.txt">Table of n, a(n) for n = 1..1000</a>

%e 9 is in the sequence because there are 2 solutions to x^2 - y^2 = 9, namely (x,y) = (3,0), (5,4).

%t r[n_] := Reduce[x^2 - y^2 == n && x > y >= 0, {x, y}, Integers]; Reap[For[n = 1, n < 200, n++, rn = r[n]; If[rn[[0]] === Or && Length[rn] == 2, Print[n]; Sow[n]]]][[2, 1]] (* _Jean-François Alcover_, Apr 22 2015 *)

%o (PARI) is_A257409(n)={A034178(n)==2} \\ _M. F. Hasler_, Apr 22 2015

%Y Cf. A257408, A257410-A257417.

%Y Cf. A058957, A034178.

%K nonn

%O 1,1

%A _Colin Barker_, Apr 22 2015