# Difference between Two Squares equal to Repunit/Mistake

## Source Work

The Dictionary
$111$

## Mistake

$111 = 20^2 - 17^2$, the third difference of $2$ squares equal to a repunit. The sequence of such squares starts $1, 0$; $6, 5$; $20, 17$; $56, 45$; $156, 115$; $344, 85$; $356, 125 \ldots$

## Correction

The instances:

 $\ds 56^2 - 55^2$ $=$ $\ds 111$ $\ds 340^2 - 67^2$ $=$ $\ds 111 \, 111$

have been omitted.

This omission does not originate from David Wells -- but it does not appear (for reasons to be explained) in the list generated by C.B. Lacampagne and J.L. Selfridge.

It is necessary to point out that the work by C.B. Lacampagne and J.L. Selfridge started as an extension of the question:

Find all two- and three-digit squares such that when one is subtracted from each digit, the resulting number is a square.

This was apparently a grade-school exercise set by Mary Grace Kantowski.

C.B. Lacampagne and J.L. Selfridge expanded the question to extend to $n$-digit squares. The question they formulated was:

For each $n$, find all positive integers $x$ and $y$ such that $x^2 - y^2 = 11 \cdots 1$ ($n$ ones) and $x^2$ contains no zero digits.

As such, this question is a flawed implementation of the problem in question, for the instance:

$56^2 - 55^2 = 111$

while it satisfies this condition, it is not the case that by subtracting $1$ from each digit of $56^2$ you get $55^2$, but you do get a repunit by subtracting $55^2$ from $56^2$.

So, on analysis of the paper by C.B. Lacampagne and J.L. Selfridge, we find that while they have indeed found:

all the squares such that when one is subtracted from each digit, the resulting number is another square

all positive integers $x$ and $y$ such that $x^2 - y^2 = 11 \cdots 1$ ($n$ ones) and $x^2$ contains no zero digits.

In particular, they have glossed over those squares of the form $56^2 - 55^2 = 111$:

 $\ds 111$ $=$ $\ds 111 \times 1$ $\ds \leadsto \ \$ $\ds \frac {111 + 1} 2$ $=$ $\ds 56$ $\ds \frac {111 - 1} 2$ $=$ $\ds 55$ $\ds \leadsto \ \$ $\ds$  $\ds 56^2 - 55^2$ $\ds$ $=$ $\ds 3136 - 3025$ $\ds$ $=$ $\ds 111$

and the like, as well as specifically considering and excluding those of the form:

 $\ds 111$ $=$ $\ds 37 \times 3$ $\ds \leadsto \ \$ $\ds \frac {37 + 3} 2$ $=$ $\ds 20$ $\ds \frac {37 - 3} 2$ $=$ $\ds 17$ $\ds \leadsto \ \$ $\ds$  $\ds 20^2 - 17^2$ $\ds$ $=$ $\ds 400 - 289$ $\ds$ $=$ $\ds 111$

David Wells, however, includes $20^2 - 17^2 = 400 - 289 = 111$ in his list, suggesting that he is not deliberately excluding such where $x^2$ has a zero digit.

Consequently it appears that the incompleteness of his list is the result of not having completely worked through the content of the C.B. Lacampagne and J.L. Selfridge paper.