login
Numbers n such that the difference between n and the largest square less than n is a nonzero square.
1

%I #22 May 23 2016 03:09:00

%S 2,5,8,10,13,17,20,26,29,34,37,40,45,50,53,58,65,68,73,80,82,85,90,97,

%T 101,104,109,116,122,125,130,137,145,148,153,160,170,173,178,185,194,

%U 197,200,205,212,221,226,229,234,241,250,257,260,265,272,281,290,293,298,305

%N Numbers n such that the difference between n and the largest square less than n is a nonzero square.

%C Numbers n such that A053186(n) is a positive square. - _Michel Marcus_, Oct 23 2015

%C Numbers of the form a^2 + b^2 where a >= 1 and 1 <= b^2 <= 2a. - _Robert Israel_, Oct 23 2015

%C Numbers n such that A053610(n) = 2. - _Thomas Ordowski_, May 22 2016

%H Robert Israel, <a href="/A263651/b263651.txt">Table of n, a(n) for n = 1..10000</a>

%e For n=5, the largest square less than 5 is 4, and the difference between 4 and 5 is 1, which is also square.

%p N:= 1000: # to get all terms <= N

%p sort([seq(seq(a^2 + b^2, b=1..min(floor(sqrt(2*a)),floor(sqrt(N-a^2)))),a=1..floor(sqrt(N-1)))]); # _Robert Israel_, Oct 23 2015

%t Select[Range@ 305, And[IntegerQ@ Sqrt[# - Floor[Sqrt@ #]^2], ! IntegerQ@ Sqrt@ #] &] (* _Michael De Vlieger_, Oct 23 2015 *)

%o (PARI) isok(n) = (d = (n - sqrtint(n)^2)) && issquare(d); \\ _Michel Marcus_, Oct 23 2015

%Y Cf. A053186.

%K nonn,easy

%O 1,1

%A _Eli Jaffe_, Oct 22 2015

%E More terms from _Michel Marcus_, Oct 23 2015