Self number

Type of natural number

In number theory, a self number or Devlali number in a given number base b {\displaystyle b} is a natural number that cannot be written as the sum of any other natural number n {\displaystyle n} and the individual digits of n {\displaystyle n} . 20 is a self number (in base 10), because no such combination can be found (all n < 15 {\displaystyle n<15} give a result less than 20; all other n {\displaystyle n} 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.[1]

Definition and properties

Let n {\displaystyle n} be a natural number. We define the b {\displaystyle b} -self function for base b > 1 {\displaystyle b>1} F b : N N {\displaystyle F_{b}:\mathbb {N} \rightarrow \mathbb {N} } to be the following:

F b ( n ) = n + i = 0 k 1 d i . {\displaystyle F_{b}(n)=n+\sum _{i=0}^{k-1}d_{i}.}

where k = log b n + 1 {\displaystyle k=\lfloor \log _{b}{n}\rfloor +1} is the number of digits in the number in base b {\displaystyle b} , and

d i = n mod b i + 1 n mod b i b i {\displaystyle d_{i}={\frac {n{\bmod {b^{i+1}}}-n{\bmod {b}}^{i}}{b^{i}}}}

is the value of each digit of the number. A natural number n {\displaystyle n} is a b {\displaystyle b} -self number if the preimage of n {\displaystyle n} for F b {\displaystyle F_{b}} 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.[2]

The set of self numbers in a given base b {\displaystyle b} is infinite and has a positive asymptotic density: when b {\displaystyle b} is odd, this density is 1/2.[3]

Recurrent formula

The following recurrence relation generates some base 10 self numbers:

C k = 8 10 k 1 + C k 1 + 8 {\displaystyle C_{k}=8\cdot 10^{k-1}+C_{k-1}+8}

(with C1 = 9)

And for binary numbers:

C k = 2 j + C k 1 + 1 {\displaystyle C_{k}=2^{j}+C_{k-1}+1\,}

(where j stands for the number of digits) we can generalize a recurrence relation to generate self numbers in any base b:

C k = ( b 2 ) b k 1 + C k 1 + ( b 2 ) {\displaystyle C_{k}=(b-2)b^{k-1}+C_{k-1}+(b-2)\,}

in which C1 = b − 1 for even bases and C1 = 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:

  1. In general, n is self if and only if m = R(n)+SOD(R(n))-SOD(n) is self

    Where:

    R(n) is the smallest rightmost digits of n, greater than 9.d(n)
    d(n) is the number of digits in n
    SOD(x) is the sum of digits of x, the function S10(x) from above.
  2. If n = a 10 b + c ,   c < 10 b {\displaystyle n=a\cdot 10^{b}+c,\ c<10^{b}} , then n is self if and only if both {m1 & m2} are negative or self

    Where:

    m1 = c - SOD(a)
    m2 = SOD(a-1)+9·b-(c+1)
  3. For the simple case of a=1 & c=0 in the previous model (i.e. n = 10 b {\displaystyle n=10^{b}} ), then n is self if and only if (9·b-1) is self

Effective test

Kaprekar demonstrated that:

n is self if S O D ( | n D R ( n ) 9 i | ) [ D R ( n ) + 9 i ] i 0 d ( n ) {\displaystyle \mathrm {SOD} (|n-\mathrm {DR} ^{*}(n)-9\cdot i|)\neq [\mathrm {DR} ^{*}(n)+9\cdot i]\quad \forall i\in 0\ldots d(n)}

Where:

D R ( n ) = { D R ( n ) 2 , if  D R ( n )  is even D R ( n ) + 9 2 , if  D R ( n )  is odd {\displaystyle \mathrm {DR} ^{*}(n)={\begin{cases}{\frac {\mathrm {DR} (n)}{2}},&{\text{if }}\mathrm {DR} (n){\text{ is even}}\\{\frac {\mathrm {DR} (n)+9}{2}},&{\text{if }}\mathrm {DR} (n){\text{ is odd}}\end{cases}}}
D R ( n ) = { 9 , if  S O D ( n ) mod 9 = 0 S O D ( n ) mod 9 , otherwise = 1 + [ ( n 1 ) mod 9 ] {\displaystyle {\begin{aligned}\mathrm {DR} (n)&{}={\begin{cases}9,&{\text{if }}\mathrm {SOD} (n)\mod 9=0\\\mathrm {SOD} (n)\mod 9,&{\text{otherwise}}\end{cases}}\\&{}=1+[(n-1)\mod 9]\end{aligned}}}
S O D ( n ) {\displaystyle \mathrm {SOD} (n)} is the sum of all digits in n.
d ( n ) {\displaystyle d(n)} is the number of digits in n.

Self numbers in specific bases

For base 2 self numbers, see OEIS: A010061. (written in base 10)

The first few base 10 self numbers are:

1, 3, 5, 7, 9, 20, 31, 42, 53, 64, 75, 86, 97, 108, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 211, 222, 233, 244, 255, 266, 277, 288, 299, 310, 312, 323, 334, 345, 356, 367, 378, 389, 400, 411, 413, 424, 435, 446, 457, 468, 479, 490, ... (sequence A003052 in the OEIS)

In base 12, the self numbers are: (using A and B for ten and eleven, respectively)

1, 3, 5, 7, 9, B, 20, 31, 42, 53, 64, 75, 86, 97, A8, B9, 102, 110, 121, 132, 143, 154, 165, 176, 187, 198, 1A9, 1BA, 20B, 211, 222, 233, 244, 255, 266, 277, 288, 299, 2AA, 2BB, 310, 312, 323, 334, 345, 356, 367, 378, 389, 39A, 3AB, 400, 411, 413, 424, 435, 446, 457, 468, 479, 48A, 49B, 4B0, 501, 512, 514, 525, 536, 547, 558, 569, 57A, 58B, 5A0, 5B1, ...

Self primes

A self prime is a self number that is prime.

The first few self primes in base 10 are

3, 5, 7, 31, 53, 97, 211, 233, 277, 367, 389, 457, 479, 547, 569, 613, 659, 727, 839, 883, 929, 1021, 1087, 1109, 1223, 1289, 1447, 1559, 1627, 1693, 1783, 1873, ... (sequence A006378 in the OEIS)

The first few self primes in base 12 are:

3, 5, 7, B, 31, 75, 255, 277, 2AA, 3BA, 435, 457, 58B, 5B1, ...

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 as of 2006[update].

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.

Base Certificate Sum of digits
40 1959 = [ 1 , 8 , 39 ] 40 {\displaystyle 1959=[1,8,39]_{40}} 48
41
42 1967 = [ 1 , 4 , 35 ] 42 {\displaystyle 1967=[1,4,35]_{42}} 40
43
44 1971 = [ 1 , 0 , 35 ] 44 {\displaystyle 1971=[1,0,35]_{44}} 36
44 1928 = [ 43 , 36 ] 44 {\displaystyle 1928=[43,36]_{44}} 79
45
46 1926 = [ 41 , 40 ] 46 {\displaystyle 1926=[41,40]_{46}} 81
47
48
49
50 1959 = [ 39 , 9 ] 50 {\displaystyle 1959=[39,9]_{50}} 48
51
52 1947 = [ 37 , 23 ] 52 {\displaystyle 1947=[37,23]_{52}} 60
53
54 1931 = [ 35 , 41 ] 54 {\displaystyle 1931=[35,41]_{54}} 76
55
56 1966 = [ 35 , 6 ] 56 {\displaystyle 1966=[35,6]_{56}} 41
57
58 1944 = [ 33 , 30 ] 58 {\displaystyle 1944=[33,30]_{58}} 63
59
60 1918 = [ 31 , 58 ] 60 {\displaystyle 1918=[31,58]_{60}} 89

References

  1. ^ "Self Numbers". rstudio-pubs-static.s3.amazonaws.com. Retrieved 2024-02-29.
  2. ^ Sándor & Crstici (2004) p.384
  3. ^ Sándor & Crstici (2004) p.385
  • Kaprekar, D. R. The Mathematics of New Self-Numbers Devaiali (1963): 19 - 20.
  • R. B. Patel (1991). "Some Tests for k-Self Numbers". Math. Student. 56: 206–210.
  • B. Recaman (1974). "Problem E2408". Amer. Math. Monthly. 81 (4): 407. doi:10.2307/2319017. JSTOR 2319017.
  • Sándor, Jozsef; Crstici, Borislav (2004). Handbook of number theory II. Dordrecht: Kluwer Academic. pp. 32–36. ISBN 1-4020-2546-7. Zbl 1079.11001.
  • Weisstein, Eric W. "Self Number". MathWorld.
  • v
  • t
  • e
Prime number classes
By formula
  • Fermat (22n + 1)
  • Mersenne (2p − 1)
  • Double Mersenne (22p−1 − 1)
  • Wagstaff (2p + 1)/3
  • Proth (k·2n + 1)
  • Factorial (n! ± 1)
  • Primorial (pn# ± 1)
  • Euclid (pn# + 1)
  • Pythagorean (4n + 1)
  • Pierpont (2m·3n + 1)
  • Quartan (x4 + y4)
  • Solinas (2m ± 2n ± 1)
  • Cullen (n·2n + 1)
  • Woodall (n·2n − 1)
  • Cuban (x3 − y3)/(x − y)
  • Leyland (xy + yx)
  • Thabit (3·2n − 1)
  • Williams ((b−1)·bn − 1)
  • Mills (A3n)
By integer sequenceBy propertyBase-dependentPatterns
  • Twin (p, p + 2)
  • Bi-twin chain (n ± 1, 2n ± 1, 4n ± 1, …)
  • Triplet (p, p + 2 or p + 4, p + 6)
  • Quadruplet (p, p + 2, p + 6, p + 8)
  • k-tuple
  • Cousin (p, p + 4)
  • Sexy (p, p + 6)
  • Chen
  • Sophie Germain/Safe (p, 2p + 1)
  • Cunningham (p, 2p ± 1, 4p ± 3, 8p ± 7, ...)
  • Arithmetic progression (p + a·n, n = 0, 1, 2, 3, ...)
  • Balanced (consecutive p − n, p, p + n)
By sizeComplex numbersComposite numbersRelated topicsFirst 60 primes
  • 2
  • 3
  • 5
  • 7
  • 11
  • 13
  • 17
  • 19
  • 23
  • 29
  • 31
  • 37
  • 41
  • 43
  • 47
  • 53
  • 59
  • 61
  • 67
  • 71
  • 73
  • 79
  • 83
  • 89
  • 97
  • 101
  • 103
  • 107
  • 109
  • 113
  • 127
  • 131
  • 137
  • 139
  • 149
  • 151
  • 157
  • 163
  • 167
  • 173
  • 179
  • 181
  • 191
  • 193
  • 197
  • 199
  • 211
  • 223
  • 227
  • 229
  • 233
  • 239
  • 241
  • 251
  • 257
  • 263
  • 269
  • 271
  • 277
  • 281
  • v
  • t
  • e
Classes of natural numbers
Of the form a × 2b ± 1
Other polynomial numbers
Recursively defined numbers
Possessing a specific set of other numbers
Expressible via specific sums
2-dimensional
centered
non-centered
3-dimensional
centered
non-centered
pyramidal
4-dimensional
non-centered
Combinatorial numbers
Divisor functions
Prime omega functions
Euler's totient function
Aliquot sequences
Primorial
Numeral system-dependent numbers
Arithmetic functions
and dynamics
Digit sum
Digit product
Coding-related
Other
P-adic numbers-related
Digit-composition related
Digit-permutation related
Divisor-related
Other
Generated via a sieve
  • Mathematics portal