Consider the problem for an arbitrary base
. Let
, with
. If
(that is, the number has 3 or more digits),
then
cannot equal the sum of its digits squared. This is shown by
contradiction below, assuming that
, and that the number
is equal to the sum of its digits squared:
Since this is false for all
, no number of three or more
digits can be equal to the sum of its digits squared in any base.
Obviously, except for 1, no other single digit can equal itself
squared. Therefore, a number in any base that is equal to the sum of
its digits squared must have exactly two digits, and by
definition be a PPDI. Using the definitions given above, if
and the number is a PPDI, then:
Subramanian ([9]) uses this equation to derive an
equation for calculating the number of order-2 PPDIs in a given base.
First of all, the number of representations of
as the sum
of two squares is known to be
This leads to the following theorem:
Theorem: In any given base
, the number
of order 2
PPDIs is given by
, where
= all divisors of
such that
.
Proof: If
is even, then
is odd, so all
proper divisors of
will be odd, thus
where
= all proper odd divisors of
.
If
is odd, then
, where
is odd. If
is the set of proper odd divisors of
, then
is the set of even divisors
of
. Since
and
have the same number of elements,
the theorem follows from the equation given above for
.