OFFSET
1,2
COMMENTS
Nonnegative integers representable as the product u*v with (u-v)/2 being a positive square.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(x) local d, u;
d:= select(t -> t^2 > x, numtheory:-divisors(x));
for u in d do if issqr((u-x/u)/2) then return true fi od;
false
end proc:
filter(0):= true:
select(filter, [$0..1000]); # Robert Israel, Nov 06 2017
MATHEMATICA
filterQ[x_] := Catch[With[{d = Select[Divisors[x], #^2 > x&]}, Do[If[IntegerQ[Sqrt[(u-x/u)/2]], Throw[True]], {u, d}]; Throw[False]]];
filterQ[0] = True;
Select[Range[0, 1000], filterQ] (* Jean-François Alcover, Jul 24 2020, after Robert Israel *)
PROG
(PARI) for(k=1, 1000, fordiv(k, d, if(d*d>=k, break); if( issquare((k\d - d)/2), print1(k, ", "); break) ) )
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 24 2009, based on email from Joerg Arndt, Oct 10 2009
EXTENSIONS
Edited and extended by Max Alekseyev, Feb 06 2010
STATUS
approved