The Triangle That Repeats Early
A simple counting pattern, a hidden square, and a shortcut that skips 47 out of every 48 tries.
Stack bowling pins: one in front, two behind, then three, then four. That is ten pins. You just built a triangular number.
01What is a triangular number?
It is the number of dots you need to build a triangle. Start with one dot. To make the next triangle, add a new row with one more dot than the row above. Count the dots each time and you get the list 1, 3, 6, 10, 15, 21 …
Mathematicians write the nth one as T(n). There is a shortcut formula so you never have to count: T(n) = n × (n + 1) ÷ 2. Try it for the 4th: 4 × 5 ÷ 2 = 10. The 100th is 100 × 101 ÷ 2 = 5050.
02The question: what is left over?
Remainders are what is left after dividing. Divide 5050 by 144: 144 goes into it 35 times (that is 5040), and 10 is left over. Now look at the 4th triangle. It is just 10, and 10 divided by 144 leaves 10. Two different triangles, same leftover.
So here is the puzzle this paper answers: which triangular numbers leave exactly 10 when you divide by 144?
You could test them one at a time, forever. Or you could find the pattern.
03The pattern
The triangles that work are the 4th, 91st, 100th, 187th, 196th, 283rd … The gaps between them go 87, 9, 87, 9, … and never change.
You can check one by hand. The 91st triangle is 91 × 92 ÷ 2 = 4186. Then 4186 − 29 × 144 = 4186 − 4176 = 10. It works.
04Why: a square hides inside every triangle
Here is the key trick. Take any triangular number, multiply it by 8, and add 1. You always get a perfect square.
Example: 8 × 10 + 1 = 81 = 9 × 9
You can see it. Take eight copies of the 10-dot triangle and arrange them like a pinwheel around one extra dot. They fill a perfect 9 × 9 square.
Because of this trick, the question about remainders turns into a question about factoring, and factoring is where the pattern comes from. Our modulus is 144, and 144 = 16 × 9. That 9 is itself 3 × 3, a square. When a square sits inside the modulus, two of the answers to the equation land on top of each other, and the whole pattern repeats sooner than it normally would. A modulus with no hidden square would repeat after 288 triangles. Ours repeats after 96.
05The theorem, in plain words
For 144, the odd part is 9. Its square root is 3. So the usual repeat length 288 shrinks to 288 ÷ 3 = 96. The paper proves this for every modulus of the form 2a × R with R odd, aiming at the triangular number with index (R − 1) ÷ 2. Here is the table for a few moduli, which I checked by direct computation:
| modulus | odd part R | target T | repeat length |
|---|---|---|---|
| 24 | 3 | 1 | 48 |
| 72 | 9 | 10 | 48 |
| 144 | 9 | 10 | 96 |
| 200 | 25 | 78 | 80 |
| 432 | 27 | 91 | 288 |
| 1296 | 81 | 820 | 288 |
06Why it matters
This is a filter. Imagine a computer searching for triangular numbers that leave a certain remainder. Without the theorem it must test every candidate. With it, the computer only looks at two out of every 96 and skips 47 out of every 48 before doing any heavy work. Cheap filters like this are a standard way to speed up number searches.
The idea behind it, two roots of an equation colliding when the modulus has square content, is not special to triangles. The same style of argument can be tried on other shapes of numbers, such as pentagonal numbers, and on other equations that factor into two pieces.
07The second half: a mirror inside 144
The paper then asks a separate question that lands on the same number. Inside the multiplication table mod 144, there are 7 special numbers (besides 1) whose square is 1. The paper tests each one with a small calculation and finds that exactly one of them, 55, produces a gap equal to a triangular number, and that number is T(4) = 10, the very target from the first half.
The equation that comes out, n² + n − 20 = 0, factors as (n − 4)(n + 5), so its roots are 4 and −5. Those two numbers add up to 9, the square root of 81.
08The animation
The video follows the same story in 30 seconds. First, hundreds of triangles spiral outward, each colored by its remainder mod 144.
Then everything dims except the winners. They turn gold, and they are exactly one in every 48.
Next, eight ten-dot triangles snap into the 9 × 9 square. Last, the 100th triangle builds itself dot by dot while a counter climbs to 5050.
Everything in this article is plain arithmetic. You can check any line of it with a calculator.