Pythagorean Triples and Pandigital-Type Patterns Generator
Discover exact digit-preserving families among primitive and multiple Pythagorean triples.
Created by Inder J. Taneja
a² + b² = c², a < b • Primitive when gcd(a,b) = 1
Specific number: every Pythagorean triple containing the number is used as a start, whether the number is the smaller leg, the larger leg, or the hypotenuse. Specific triple: enter three numbers in any order, e.g. 19, 180, 181. In both cases each leg in turn is allowed to grow, so families where the larger leg grows, such as (19, 180, 181) → (1980, 12019, 12181), are found. The other leg and the hypotenuse must keep their earlier digits in order.
Insert one digit (0–9), a two-digit block (00–99), or search both. The same block and the same left, middle, or right position remain fixed throughout a chain. A leading-zero block such as 03 is preserved in middle/right positions. Two-digit searches test more candidates and may take longer.
Pandigital-type families use Euclid’s formula with m = c·R(n+1) and a fixed k, where R(n+1) = 11…1 has n+1 ones: first leg = m² − k², second leg = 2mk, hypotenuse = m² + k². The core m² = c²·R(n+1)² follows the palindromes 1, 121, 12321, … up to row 8. With c = 10 and k = 1–9 you get the classic families (12019² + 1980² = 12181², …). With c = 3 the core is 9, 1089, 110889, 11108889, …. A family keeps only rows with m > k and only its unbroken run in which every row contains the previous row’s digits in order (first leg, second leg and hypotenuse); the run must have at least 3 rows. A number or triple is reported only if it lies inside that run. Families by c and k: choose c and the k values (a range 1-9, a list 1,9, or both). Specific number: shows every family where the number is the core m² of a row, then every family where it is a leg or the hypotenuse; ★ marks its row. Specific triple: writes the triple as g·(m² − k², 2mk, m² + k²) and shows each family through it.