Generate All Pythagorean Triples

Generate All Pythagorean Triples
Loading the math board and drawing, please wait…
2020-02-21 21:48
This example demonstrates how to generate all Pythagorean triples. It involves the Pythagorean theorem and sequence concepts. Using GeoGebra commands such as Sequence, Union, Point, etc., it dynamically shows Pythagorean triples for different m and n values. Suitable for middle school and above students to learn about the Pythagorean theorem and sequences.

GeoGebra Commands & Parameters

  1. Sequence(Sequence[(-(j + (k * ί))^(2)), j, 1, m], k, 1, m) → l4
  2. Sequence(Sequence[(j + (k * ί))^(2), j, 1, m], k, 1, m) → l3
  3. Sequence(Parabola[(0, 0), x = (-2 * j^(2))], j, 1, m) → grid1
  4. Sequence(Parabola[(0, 0), x = (2 * j^(2))], j, 1, m) → grid2
  5. Union(l3, l4) → l5
  6. Point(l5) → P
  7. Segment(O, Q) → px
  8. Segment(P, Q) → py
  9. Segment(O, P) → pz
  10. Polygon(Q, Rotate[P, (((-sgn(x(P))) * sgn(y(P))) * π / 2), Q], Rotate[Q, ((sgn(x(P)) * sgn(y(P))) * π / 2), P], P) → Qy, f, g, l, p
  11. Polygon(O, Q, Rotate[O, ((sgn(x(P)) * sgn(y(P))) * π / 2), Q], Rotate[Q, ((sgn(x(P)) * sgn(y(P))) * ((-π)) / 2)]) → Qx, h, i, q, r
  12. Circle((0, 0), 1) → k
  13. Point(k) → P2
  14. Segment(Q1, (0, 0)) → px'
  15. Segment(Q1, P1) → py'
  16. Segment((0, 0), P1) → pz'
  17. Polygon(O, P, Rotate[O, (((-sgn(x(P))) * sgn(y(P))) * π / 2), P], Rotate[P, ((sgn(x(P)) * sgn(y(P))) * π / 2)]) → Qz, j, s, t, a
  18. Polygon(O, P1, Rotate[O, ((-π)) / 2, P1], Rotate[P1, π / 2]) → Qz1, o, p1, b, c
  19. Polygon(Q1, Rotate[P1, (((-sgn(x(P1))) * sgn(y(P1))) * π / 2), Q1], Rotate[Q1, ((sgn(x(P1)) * sgn(y(P1))) * π / 2), P1], P1) → Qy1, q1, d, e, f_1
  20. Polygon(O, Q1, Rotate[O, ((sgn(x(P1)) * sgn(y(P1))) * π / 2), Q1], Rotate[Q1, ((sgn(x(P1)) * sgn(y(P1))) * ((-π)) / 2)]) → Qx1, g_1, h_1, i_1, j_1
  21. Angle((10000, 0), O, P) → α
  22. Sequence(Sequence[(k + (j * ί))^(u), j, -10, 10], k, -10, 10) → l1
  23. Polygon((10.5, 10.5), (-10.5, 10.5), (-10.5, -10.5), (10.5, -10.5)) → v1, k_1, l_1, m_1, n_1