 # 78 arithmetic/digits/squares/change.leading.p

## Description

This article is from the Puzzles FAQ, by Chris Cole chris@questrel.questrel.com and Matthew Daly mwdaly@pobox.com with numerous contributions by others.

# 78 arithmetic/digits/squares/change.leading.p

What squares remain squares when their leading digits are incremented?

arithmetic/digits/squares/change.leading.s

Omitting solutions that are obtained from smaller solutions by
multiplying by powers of 10, the squares of these numbers satisfy the
condition:

1. (105,145), (3375,4625), (14025,17225), (326625,454625),
(10846875,14753125), (43708125,53948125), ...

2. (45,55), (144375,175625), (463171875,560828125), ...

7. (2824483699753370361328125,2996282391593370361328125), ...

Here is how to find them. We have (y+x)*(y-x) = 10^n, and so we must have
{y+x, y-x} as {5^m*10^a, 2^m*10^b} in some order. It is also necessary (and
sufficient) that y/x lies in the interval [sqrt(3/2),sqrt(2)], or equivalently
that (y+x)/(y-x) lies in [3+sqrt(8),5+sqrt(24)] = [5.82842...,9.89897...].
Thus we need to make (5/2)^m*10^(a-b), or its reciprocal, in this range.
For each m there is clearly at most one power of 10 that will do. m=2,a=b
gives (105,145); m=3,b=a+2 gives (3375,4625), and so on.

There are infinitely many non-equivalent solutions, because log(5/2) / log(10)
is irrational.

One can use exactly the same argument to find squares whose initial 2 can
be replaced by a 3, of course, except that the range of (y+x)/(y-x) changes.

Continue to: