# JSH: Bait

D is an odd composite to be factored.

Method 1:
=======
D = S^2 + R

(S*X + Y)^2 - D*X^2 = -R*X^2 +2*S*X*Y + Y^2

Find X, Y to produce a square on the right.

Method 2:
=======
D = S^2 + R

Define an easily factored surrogate T(A, B, C)

(B^2 + R) / 2 = A * C
with A an odd number
Note that:
(A + B)^2 + R = A*(A + 2*B + 2*C)

Define another surrogate U(X, Y, Z)

(Y^2 -1) / 2 = X * Z
with X odd and Z a multiple of 4
Note that:
(X + Y)^2 -1 = X*(X + 2*Y + 2*Z)

Define S = T dot U = A*X + B*Y + C*Z

Then

(S*X + C)^2 - D*X^2 = (Y*C + X*B)^2

and

(S*Z + A)^2 - D*Z^2 = (Y*A + Z*B)^2

Enrico

.

## Relevant Pages

• Re: Three squares
... solution pair, so it suffices to consider primitive solutions, i.e., ... Then, since v is a square and v is a square, it ... where a,b are either both odd or both even. ... for some positive integers s,t, both odd, with gcd=1. ...
(sci.math)
• Re: Extreme Efficiency for Odd/Even
... C++-ers have used against function macros for years now apply to C. ... t.c:7: warning: ISO C90 does not support 'long long' ... square of 8+1 is odd ...
(comp.lang.c)
• Re: mapping field elements-
... The answer to your question depends on what you mean by "transformation." ... Fields of odd characteristic p have a multiplication group M of even order. ... are the square of a pair of opposite field elements, ...
(sci.math)
• Re: Three squares
... any positive integer multiple of a solution pair is also a ... solution pair, so it suffices to consider primitive solutions, i.e., ... Then, since v is a square and v is a square, it ... where a,b are either both odd or both even. ...
(sci.math)
• Re: Alignment and 4E
... intersections seem to work faster and easier for me. ... It can lead to some odd results, ... square you're in and an equal number of squares left/right and ... situations where facing is important. ...
(rec.games.frp.dnd)