A263651 Numbers n such that the difference between n and the largest square less than n is a nonzero square.
2, 5, 8, 10, 13, 17, 20, 26, 29, 34, 37, 40, 45, 50, 53, 58, 65, 68, 73, 80, 82, 85, 90, 97, 101, 104, 109, 116, 122, 125, 130, 137, 145, 148, 153, 160, 170, 173, 178, 185, 194, 197, 200, 205, 212, 221, 226, 229, 234, 241, 250, 257, 260, 265, 272, 281, 290, 293, 298, 305
Offset: 1
Examples
For n=5, the largest square less than 5 is 4, and the difference between 4 and 5 is 1, which is also square.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A053186.
Programs
-
Maple
N:= 1000: # to get all terms <= N 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
-
Mathematica
Select[Range@ 305, And[IntegerQ@ Sqrt[# - Floor[Sqrt@ #]^2], ! IntegerQ@ Sqrt@ #] &] (* Michael De Vlieger, Oct 23 2015 *)
-
PARI
isok(n) = (d = (n - sqrtint(n)^2)) && issquare(d); \\ Michel Marcus, Oct 23 2015
Extensions
More terms from Michel Marcus, Oct 23 2015
Comments