Skip to main content
added 173 characters in body
Source Link
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456

Bound the variables from both sides if you want to get explicit results

s = Solve[a^2+b^2==c^2&& -100 < a < 100&& -100 < b < 100&& -100 < c < 100, {a,b,c}, Integers]
(* -> {{a -> -99, b -> 0, c -> -99}, {a -> -98, b -> 0, c -> 98} ... *)
ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Or you could reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

Bound the variables from both sides if you want to get explicit results

s = Solve[a^2+b^2==c^2&& -100 < a < 100&& -100 < b < 100&& -100 < c < 100, {a,b,c}, Integers]
ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Or you could reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

Bound the variables from both sides if you want to get explicit results

s = Solve[a^2+b^2==c^2&& -100 < a < 100&& -100 < b < 100&& -100 < c < 100, {a,b,c}, Integers]
(* -> {{a -> -99, b -> 0, c -> -99}, {a -> -98, b -> 0, c -> 98} ... *)
ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Or you could reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

added 173 characters in body
Source Link
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456

It doesBound the variables from both sides if you want to get explicit results

s = Solve[a^2+b^2==c^2&& -100 < a < 100&& -100 < b < 100&& -100 < c < 100, {a,b,c}, Integers]
ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Or you could reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

It does if you reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

Bound the variables from both sides if you want to get explicit results

s = Solve[a^2+b^2==c^2&& -100 < a < 100&& -100 < b < 100&& -100 < c < 100, {a,b,c}, Integers]
ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Or you could reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

added 156 characters in body
Source Link
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456

It does if you reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

It does if you reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

It does if you reduce the domain to positive integers, taken advantage of the problem being quadratic on all vars:

s = Solve[a^2 + b^2 - c^2 == 0 && 
      0 <= a < 100 && 0 <= b < 100 &&  0 <= c < 100, {a, b, c}, Integers]

ListPointPlot3D[{a, b, c} /. s]

Mathematica graphics

Edit

And you can verify that

2 Sum[SquaresR[2, i^2], {i, 0, 99}] -1 == (2 Length@# -Count[#, 0]) &@Flatten[{a, b, c} /. s]
(* True *)

This is a useful reading when solving Diophantine equations

added 156 characters in body
Source Link
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456
Loading
Source Link
Dr. belisarius
  • 116.2k
  • 13
  • 205
  • 456
Loading