\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb,booktabs,hyperref}
\title{A smaller enclosing primitive Pythagorean triangle}
\author{}
\date{}
\begin{document}
\maketitle
Felix Huber starts a sequence with the triangle $(3,4,5)$. At each step he chooses a primitive Pythagorean triple whose three sides, sorted in increasing order, each exceed the corresponding side of the preceding triangle. Among these he minimizes perimeter, breaking ties by area. Write $T_n$ for the $n$th triangle and $a(n)$ for its semiperimeter. Huber conjectured that no primitive Pythagorean triangle of semiperimeter smaller than $a(n)$ can enclose $T_{n-1}$ without touching it. See \href{https://oeis.org/A379600}{OEIS A379600} (February 2025).

\paragraph{Counterexample.}
The greedy sequence has
\[
T_{94}=(5445,6308,8333),\qquad T_{95}=(5568,6545,8593).
\]
The primitive triangle $U=(5676,6307,8485)$ strictly encloses a congruent copy of $T_{94}$. Its semiperimeter is $10234$, smaller than $a(95)=10353$. Its longer leg falls one unit short of the longer leg of $T_{94}$, so the sidewise growth rule excludes it.

\paragraph{Strict containment.}
Place $U$ with vertices $(0,0),(5676,0),(0,6307)$, and place the legs of $T_{94}$ on the positive coordinate axes. Put
\[
C=70690376,\quad S=1462593,\quad H=70705505.
\]
Since $C^2+S^2=H^2$, the following affine map is a rotation followed by a translation.
\[
X=\frac{Cx-Sy+6308S}{H}+\frac1{10},
\qquad
Y=\frac{Sx+Cy}{H}+\frac1{10}.
\]
At the three inner vertices the minimum of $X$ and the minimum of $Y$ are both $1/10$. Values of the third defining inequality for the open outer triangle are
\[
\begin{array}{c|r}
(x,y) & 2H(5676\cdot6307-6307X-5676Y)\\\midrule
(0,0)&4945759887596621\\
(5445,0)&111262019621\\
(0,6308)&111262019621
\end{array}
\]
Each defining function is affine, so all three are strictly positive on the entire closed inner triangle. Direct calculation gives $5676^2+6307^2=8485^2$ and $\gcd(5676,6307)=1$.

\paragraph{Certification of the greedy terms.}
Euclid's parametrization guarantees that every primitive triple appears among the sorted triples with legs $p^2-q^2$ and $2pq$ and hypotenuse $p^2+q^2$, for integers $0<q<p$. Its semiperimeter is $p(p+q)$. The following independent reproducible enumeration obtains both rows.
\begin{enumerate}
\item List the pairs $1\le q<p\le101$ with $p(p+q)\le10353$, $\gcd(p,q)=1$, and $p-q$ odd. Compute the corresponding $1455$ triples and sort by the ordered pair (semiperimeter, product of legs).
\item Start with $(3,4,5)$ and scan once in that order. Accept a triple exactly when each of its three ordered sides exceeds its last accepted counterpart. Record every accepted triple.
\end{enumerate}
All triples of semiperimeter at most $10353$ have $p^2<10353$, so the enumeration is exhaustive. A rejected triangle remains ineligible after any further increase of all three sides. The scan returns 95 triangles and ends with the displayed pair. The last few semiperimeters, beginning at index 90, are
\[
9266,\quad 9545,\quad 9758,\quad 9945,\quad 10043,\quad 10353.
\]
The accompanying Lean proof uses the full primitive-triple classification to check each of the 94 choices against every eligible competitor of no greater perimeter, including all ties. Its geometric certificate uses the Euclidean plane and topological interior. The proof applies to every sequence satisfying the selection rule.
\end{document}
