Self number

In number theory, a self number, Colombian number or Devlali number in a given number base formula_1 is a natural number that cannot be written as the sum of any other natural number formula_2 and the individual digits of formula_2. 20 is a self number (in base 10), because no such combination can be found (all formula_4 give a result less than 20; all other formula_2 give a result greater than 20). 21 is not, because it can be written as 15 + 1 + 5 using "n" = 15. These numbers were first described in 1949 by the Indian mathematician D. R. Kaprekar.
Definition and properties.
Let formula_2 be a natural number. We define the formula_1-self function for base formula_8 formula_9 to be the following:
where formula_11 is the number of digits in the number in base formula_1, and 
is the value of each digit of the number. A natural number formula_2 is a formula_1-self number if the preimage of formula_2 for formula_17 is the empty set.
In general, for even bases, all odd numbers below the base number are self numbers, since any number below such an odd number would have to also be a 1-digit number which when added to its digit would result in an even number. For odd bases, all odd numbers are self numbers.
The set of self numbers in a given base formula_1 is infinite and has a positive asymptotic density: when formula_1 is odd, this density is 1/2.
Recurrent formula.
The following recurrence relation generates some base 10 self numbers:
And for binary numbers:
(where "j" stands for the number of digits) we can generalize a recurrence relation to generate self numbers in any base "b":
in which "C"1 = "b" − 1 for even bases and "C"1 = "b" − 2 for odd bases.
The existence of these recurrence relations shows that for any base there are infinitely many self numbers.
Selfness tests.
Reduction tests.
Luke Pebody showed (Oct 2006) that a link can be made between the self property of a large number "n" and a low-order portion of that number, adjusted for digit sums:
Effective test.
Kaprekar demonstrated that:
Where:
Self numbers in specific bases formula_1.
For base 2 self numbers, see . (written in base 10)
The first few base 10 self numbers are:
In base 12, the self numbers are: (using inverted two and three for ten and eleven, respectively)
Self primes.
A self prime is a self number that is prime. 
The first few self primes in base 10 are
The first few self primes in base 12 are: (using inverted two and three for ten and eleven, respectively)
In October 2006 Luke Pebody demonstrated that the largest known Mersenne prime in base 10 that is at the same time a self number is 224036583−1. This is then the largest known self prime in base 10 .
Extension to negative integers.
Self numbers can be extended to the negative integers by use of a signed-digit representation to represent each integer.
Excerpt from the table of bases where 2007 is self.
The following table was calculated in 2007.