# [seqfan] Re: About a problem of Bernardo Recamán Santos

William Rex Marshall w.r.marshall at actrix.co.nz
Sat Nov 27 00:48:11 CET 2010

```On 27/11/2010 1:01 a.m., Claudio Meller wrote:
> Hi seqfans,
> I found this problem in http://www.mathpuzzle.com/
> A problem of squaresBernardo Recamán Santos: Find a four-digit square number
> which has at least one digit in common with every other four-digit square
>
> Squares of k digits which has at least one digit in common with every other
> k-digit square number.
>
> 6241, 20164, 92416, 124609,  128164,  132496,  162409,  165649,  186624,

[cut]

In base 10, the smallest square which shares at least one digit with
*every* other square (greater than zero), not just those with the same
number of digits, is 92416. If we also include 0 as a square number,
then 124609 is the smallest square.

Why is this? Because the last nonzero digit of any positive square is
either 1, 4, 5, 6 or 9, and if 5 is the last nonzero digit, then 2 is
the second-last nonzero digit.

The sequence of squares which share at least one digit with every other
positive square begins:

92416, 124609, 132496, 162409, 165649, 195364, 196249, 214369, 264196,
346921, 351649, 395641, 401956, 436921, 495616, 541696, 543169, 651249,
669124, 1046529, 1192464, 1240996, 1247689, 1290496, 1354896, 1406596,
1456849, 1459264, ...

```