Skip to content
Vamshi Jandhyala

Books · Number Puzzles

Chapter 37

Squares of All the Digits

  1. How many perfect squares use each of the digits 11 to 99 exactly once?

  2. How many use all ten digits 00 to 99 exactly once?

  3. Write 123456789123456789 as the difference of two squares.

Solution

Parts 1 and 2. There are 3030 squares using the digits 11 to 99 once each, the smallest being 118262=13985427611826^2 = 139854276 and the largest 303842=92318745630384^2 = 923187456. Allowing the zero as well, there are 8787 squares using all ten digits once each, the smallest being 320432=102675384932043^2 = 1026753849. (One checks these by running through the squares in the relevant range; both counts are settled.)

Part 3. Any odd number is a difference of two consecutive squares, since (k+1)2k2=2k+1(k+1)^2 - k^2 = 2k + 1. As 123456789123456789 is odd, set 2k+1=1234567892k + 1 = 123456789, so k=61728394k = 61728394 and 123456789=617283952617283942.123456789 = 61728395^2 - 61728394^2.