Theorem: Penholodigital Square Equation

The following equations, which include each digit from $1$ to $9$ inclusive, are the only ones of their kind:
{{begin-eqn}}
{{eqn | l = 567^2
      | r = 321 \, 489
}}
{{eqn | l = 854^2
      | r = 729 \, 316
}}
{{end-eqn}}

Proof:
The square of a $2$-digit integer cannot have more than $4$ digits:
:$99^2 = 9801$
The square of a $4$-digit integer has at least $7$ digits:
:$1000^2 = 1 \, 000 \, 000$
Hence we only need to inspect $3$-digit integers, with a corresponding $6$-digit square.
A lower bound is given by $\ceiling {\sqrt {123 \, 456}} = 352$, where $123 \, 456$ is the smallest $6$-digit integer without repeating digits or $0$.
An upper bound is given by $\floor {\sqrt {876 \, 543}} = 936$, where $876 \, 543$ is the largest $6$-digit integer without repeating digits or $9$.
It is seen that it is not necessary to investigate $6$-digit squares beginning with $9$, because its square root would also begin with $9$.
It is noted that integers ending in $1$, $5$ or $6$ have squares ending in those same digits.
Such numbers can be eliminated from our search, as they will duplicate the appearance of those digits.
We also cannot have $0$ as a digit.
Moreover, observe that an integer $\bmod 9$ and its square $\bmod 9$ have the following pattern:
:<nowiki>$\begin{array}{|c|c|c|c|c|c|c|c|c|c|}
\hline n \bmod 9 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline n^2 \bmod 9 & 0 & 1 & 4 & 0 & 7 & 7 & 0 & 4 & 1 \\
\hline
\end{array}$</nowiki>
By Congruence of Sum of Digits to Base Less 1, the sum of digits of $n$ and $n^2 \pmod 9$ are congruent to $n$ and $n^2 \pmod 9$ respectively.
We must require their sum to be congruent to $0 \bmod 9$ since the sum of all their digits is:
:$1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45 \equiv 0 \pmod 9$
Hence $n \equiv 0$ or $8 \pmod 9$.
There are $52$ numbers left to check:
For $n \equiv 0 \pmod 9$:
{{begin-eqn}}
{{eqn | l = 369^2
      | r = 136 \, 161
}}
{{eqn | l = 378^2
      | r = 142 \, 884
}}
{{eqn | l = 387^2
      | r = 149 \, 769
}}
{{eqn | l = 423^2
      | r = 178 \, 929
}}
{{eqn | l = 432^2
      | r = 186 \, 624
}}
{{eqn | l = 459^2
      | r = 210 \, 681
}}
{{eqn | l = 468^2
      | r = 219 \, 024
}}
{{eqn | l = 513^2
      | r = 263 \, 169
}}
{{eqn | l = 549^2
      | r = 301 \, 401
}}
{{eqn | l = 567^2
      | r = 321 \, 489
      | c = is penholodigital
}}
{{eqn | l = 594^2
      | r = 352 \, 836
}}
{{eqn | l = 612^2
      | r = 374 \, 544
}}
{{eqn | l = 639^2
      | r = 408 \, 321
}}
{{eqn | l = 648^2
      | r = 419 \, 904
}}
{{eqn | l = 657^2
      | r = 431 \, 649
}}
{{eqn | l = 684^2
      | r = 467 \, 856
}}
{{eqn | l = 693^2
      | r = 480 \, 249
}}
{{eqn | l = 729^2
      | r = 531 \, 441
}}
{{eqn | l = 738^2
      | r = 544 \, 644
}}
{{eqn | l = 783^2
      | r = 613 \, 089
}}
{{eqn | l = 792^2
      | r = 627 \, 264
}}
{{eqn | l = 819^2
      | r = 670 \, 761
}}
{{eqn | l = 837^2
      | r = 700 \, 569
}}
{{eqn | l = 864^2
      | r = 746 \, 496
}}
{{eqn | l = 873^2
      | r = 762 \, 129
}}
{{eqn | l = 918^2
      | r = 842 \, 724
}}
{{eqn | l = 927^2
      | r = 859 \, 329
}}
{{end-eqn}}
For $n \equiv 8 \pmod 9$:
{{begin-eqn}}
{{eqn | l = 359^2
      | r = 128 \, 881
}}
{{eqn | l = 368^2
      | r = 135 \, 424
}}
{{eqn | l = 413^2
      | r = 170 \, 569
}}
{{eqn | l = 458^2
      | r = 209 \, 764
}}
{{eqn | l = 467^2
      | r = 218 \, 089
}}
{{eqn | l = 512^2
      | r = 262 \, 144
}}
{{eqn | l = 539^2
      | r = 290 \, 521
}}
{{eqn | l = 548^2
      | r = 300 \, 304
}}
{{eqn | l = 584^2
      | r = 341 \, 056
}}
{{eqn | l = 593^2
      | r = 351 \, 649
}}
{{eqn | l = 629^2
      | r = 395 \, 641
}}
{{eqn | l = 638^2
      | r = 407 \, 044
}}
{{eqn | l = 647^2
      | r = 418 \, 609
}}
{{eqn | l = 674^2
      | r = 454 \, 276
}}
{{eqn | l = 683^2
      | r = 466 \, 489
}}
{{eqn | l = 692^2
      | r = 478 \, 864
}}
{{eqn | l = 719^2
      | r = 516 \, 961
}}
{{eqn | l = 728^2
      | r = 529 \, 984
}}
{{eqn | l = 764^2
      | r = 583 \, 696
}}
{{eqn | l = 782^2
      | r = 611 \, 524
}}
{{eqn | l = 827^2
      | r = 683 \, 929
}}
{{eqn | l = 854^2
      | r = 729 \, 316
      | c = is penholodigital
}}
{{eqn | l = 863^2
      | r = 744 \, 769
}}
{{eqn | l = 872^2
      | r = 760 \, 384
}}
{{eqn | l = 917^2
      | r = 840 \, 889
}}
{{end-eqn}}
Hence the result by inspection.
{{qed}}