Integral Grid Triangles with Consecutive Side Lengths

An integral triangle is a triangle with integral side lengths. This Demonstration shows those integral triangles that have consecutive numbers as side lengths and for which all three vertices have integral coordinates.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


It can be shown that each consecutively integral triangle on the grid can be positioned such that
, , , , and .
This Demonstration shows the first 50 solutions.
It also displays two ways to calculate the solutions: using a recurrence or using an exponential formula.
Generalization in 3D
In three or more dimensions the problem of finding all consecutive triangles is still unsolved.
Here are just three examples that have no equivalent in two dimensions:
The triangle with vertices (0,0,0), (0,0,8), (6,3,2) has side lengths 7, 8, and 9.
The triangle with vertices (0,0,0), (0,0,10), (6,6,3) has side lengths 9, 10, and 11.
The triangle with vertices (0,0,0), (0,0,22), (18,6,9) has side lengths 21, 22, and 23.
Can you prove that these triangles do not fit on the two-dimensioinal integral lattice?
Can you find more examples?
In-depth discussion
The topic of consecutively integral triangles and also the more general topic of triangles on the grid with integral side lengths have been discussed in depth by the author in his book NUTTS And Other Crackers, 1994, privately published.
Many interesting recurrence relations are connected with this problem area.
Even the Lehmer–Lucas test for Mersenne prime numbers is related to these triangles!
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+