Demlo Number

The initially palindromic numbers 1, 121, 12321, 1234321, 123454321, ... (OEIS A002477). For the first through ninth terms, the sequence is given by the generating function

(1)

(Plouffe 1992, Sloane and Plouffe 1995).

The definition of this sequence is slightly ambiguous from the tenth term on, but the most common convention follows from the following observation. The sequences of consecutive and reverse digits and , respectively, are given by

(2) (3)

for , so the first few Demlo numbers are given by

(4) (5)

But, amazingly, this is just the square of the th repunit , i.e.,

(6)

for , and the squares of the first few repunits are precisely the Demlo numbers: , , , ... (OEIS A002275 and A002477). It is therefore natural to use (6) as the definition for Demlo numbers with , giving 1, 121, ..., 12345678987654321, 1234567900987654321, 123456790120987654321, ....

The equality for also follows immediately from schoolbook multiplication, as illustrated above. This follows from the algebraic identity

(7)

The sums of digits of the Demlo numbers for are given by

(8)

More generally, for , 2, ..., the sums of digits are 1, 4, 9, 16, 25, 36, 49, 64, 81, 82, 85, 90, 97, 106, ... (OEIS A080151). The values of for which these are square are 1, 2, 3, 4, 5, 6, 7, 8, 9, 36, 51, 66, 81, ... (OEIS A080161), corresponding to the Demlo numbers 1, 121, 12321, 1234321, 123454321, 12345654321, 1234567654321, 123456787654321, 12345678987654321, 12345679012345679012345679012345678987654320987654320987654320987654321, ... (OEIS A080162).