For example, is not a self number because , while is a self number because there is not a number which added to its sum of digits gives .
D.R.Kaprekar, who introduced these numbers in 1949, gave the following test to determine quickly if a number is self.
Define the functions
Then a number is self if, for every , it holds
The numbers which can be written in more than one way as are called junction numbers.
Below, the spiral pattern of self numbers up to . See the page on prime numbers for an explanation and links to similar pictures.