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

%I #14 Jun 18 2020 17:03:58

%S 96,105,120,135,160,165,168,189,195,216,224,231,255,256,264,273,280,

%T 285,297,312,345,351,352,357,375,385,399,408,416,420,429,435,440,455,

%U 456,459,465,483,512,513,520,540,544,552,555,561,595,608,609,615,616,621

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

%H Colin Barker, <a href="/A257411/b257411.txt">Table of n, a(n) for n = 1..600</a>

%e 96 is in the sequence because there are 4 solutions to x^2 - y^2 = 96, namely (x,y) = (10,2), (11,5), (14,10), (25,23).

%t nn = 1000;

%t t = Table[0, {nn}];

%t Do[n = x^2 - y^2; If[n <= nn, t[[n]]++], {x, nn}, {y, 0, x - 1}];

%t Position[t, 4] // Flatten (* _Jean-François Alcover_, Jun 18 2020, after _T. D. Noe_ in A034178 *)

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

%Y Cf. A257408, A257409, A257410, A257412, A257413, A257414, A257415, A257416, A257417.

%Y Cf. A034178.

%K nonn

%O 1,1

%A _Colin Barker_, Apr 22 2015