Template:Short description Template:Distinguish
In mathematics, a natural number in a given number base is a <math>p</math>-Kaprekar number if the representation of its square in that base can be split into two parts, where the second part has <math>p</math> digits, that add up to the original number. For example, in base 10, 45 is a 2-Kaprekar number, because 45² = 2025, and 20 + 25 = 45. The numbers are named after D. R. Kaprekar.
Definition and propertiesEdit
Let <math>n</math> be a natural number. Then the Kaprekar function for base <math>b > 1</math> and power <math>p > 0</math> <math>F_{p, b} : \mathbb{N} \rightarrow \mathbb{N}</math> is defined to be the following:
- <math>F_{p, b}(n) = \alpha + \beta</math>,
where <math>\beta = n^2 \bmod b^p</math> and
- <math>\alpha = \frac{n^2 - \beta}{b^p}</math>
A natural number <math>n</math> is a <math>p</math>-Kaprekar number if it is a fixed point for <math>F_{p, b}</math>, which occurs if <math>F_{p, b}(n) = n</math>. <math>0</math> and <math>1</math> are trivial Kaprekar numbers for all <math>b</math> and <math>p</math>, all other Kaprekar numbers are nontrivial Kaprekar numbers.
The earlier example of 45 satisfies this definition with <math>b = 10</math> and <math>p = 2</math>, because
- <math>\beta = n^2 \bmod b^p = 45^2 \bmod 10^2 = 25</math>
- <math>\alpha = \frac{n^2 - \beta}{b^p} = \frac{45^2 - 25}{10^2} = 20</math>
- <math>F_{2, 10}(45) = \alpha + \beta = 20 + 25 = 45</math>
A natural number <math>n</math> is a sociable Kaprekar number if it is a periodic point for <math>F_{p, b}</math>, where <math>F_{p, b}^k(n) = n</math> for a positive integer <math>k</math> (where <math>F_{p, b}^k</math> is the <math>k</math>th iterate of <math>F_{p, b}</math>), and forms a cycle of period <math>k</math>. A Kaprekar number is a sociable Kaprekar number with <math>k = 1</math>, and a amicable Kaprekar number is a sociable Kaprekar number with <math>k = 2</math>.
The number of iterations <math>i</math> needed for <math>F_{p, b}^{i}(n)</math> to reach a fixed point is the Kaprekar function's persistence of <math>n</math>, and undefined if it never reaches a fixed point.
There are only a finite number of <math>p</math>-Kaprekar numbers and cycles for a given base <math>b</math>, because if <math>n = b^p + m</math>, where <math>m > 0</math> then
- <math>
\begin{align} n^2 & = (b^p + m)^2 \\ & = b^{2p} + 2mb^p + m^2 \\ & = (b^p + 2m)b^p + m^2 \\ \end{align} </math>
and <math>\beta = m^2</math>, <math>\alpha = b^p + 2m</math>, and <math>F_{p, b}(n) = b^p + 2m + m^2 = n + (m^2 + m) > n</math>. Only when <math>n \leq b^p</math> do Kaprekar numbers and cycles exist.
If <math>d</math> is any divisor of <math>p</math>, then <math>n</math> is also a <math>p</math>-Kaprekar number for base <math>b^p</math>.
In base <math>b = 2</math>, all even perfect numbers are Kaprekar numbers. More generally, any numbers of the form <math>2^n (2^{n + 1} - 1)</math> or <math>2^n (2^{n + 1} + 1)</math> for natural number <math>n</math> are Kaprekar numbers in base 2.
Set-theoretic definition and unitary divisorsEdit
The set <math>K(N)</math> for a given integer <math>N</math> can be defined as the set of integers <math>X</math> for which there exist natural numbers <math>A</math> and <math>B</math> satisfying the Diophantine equation<ref name=iannucci>Iannucci (2000)</ref>
- <math>X^2 = AN + B</math>, where <math>0 \leq B < N</math>
- <math>X = A + B</math>
An <math>n</math>-Kaprekar number for base <math>b</math> is then one which lies in the set <math>K(b^n)</math>.
It was shown in 2000<ref name=iannucci/> that there is a bijection between the unitary divisors of <math>N - 1</math> and the set <math>K(N)</math> defined above. Let <math>\operatorname{Inv}(a, c)</math> denote the multiplicative inverse of <math>a</math> modulo <math>c</math>, namely the least positive integer <math>m</math> such that <math>am = 1 \bmod c</math>, and for each unitary divisor <math>d</math> of <math>N - 1</math> let <math>e = \frac{N - 1}{d}</math> and <math>\zeta(d) = d\ \text{Inv}(d, e)</math>. Then the function <math>\zeta</math> is a bijection from the set of unitary divisors of <math>N - 1</math> onto the set <math>K(N)</math>. In particular, a number <math>X</math> is in the set <math>K(N)</math> if and only if <math>X = d\ \text{Inv}(d, e)</math> for some unitary divisor <math>d</math> of <math>N - 1</math>.
The numbers in <math>K(N)</math> occur in complementary pairs, <math>X</math> and <math>N - X</math>. If <math>d</math> is a unitary divisor of <math>N - 1</math> then so is <math>e = \frac{N - 1}{d}</math>, and if <math>X = d\operatorname{Inv}(d, e)</math> then <math>N - X = e\operatorname{Inv}(e, d)</math>.
Kaprekar numbers for <math>F_{p, b}</math>Edit
b = 4k + 3 and p = 2n + 1Edit
Let <math>k</math> and <math>n</math> be natural numbers, the number base <math>b = 4k + 3 = 2(2k + 1) + 1</math>, and <math>p = 2n + 1</math>. Then:
- <math>X_1 = \frac{b^p - 1}{2} = (2k + 1) \sum_{i = 0}^{p - 1} b^i</math> is a Kaprekar number.
- <math>X_2 = \frac{b^p + 1}{2} = X_1 + 1</math> is a Kaprekar number for all natural numbers <math>n</math>.
b = m2k + m + 1 and p = mn + 1Edit
Let <math>m</math>, <math>k</math>, and <math>n</math> be natural numbers, the number base <math>b = m^2k + m + 1</math>, and the power <math>p = mn + 1</math>. Then:
- <math>X_1 = \frac{b^p - 1}{m} = (mk + 1) \sum_{i = 0}^{p - 1} b^i</math> is a Kaprekar number.
- <math>X_2 = \frac{b^p + m - 1}{m} = X_1 + 1</math> is a Kaprekar number.
b = m2k + m + 1 and p = mn + m − 1Edit
Let <math>m</math>, <math>k</math>, and <math>n</math> be natural numbers, the number base <math>b = m^2k + m + 1</math>, and the power <math>p = mn + m - 1</math>. Then:
- <math>X_1 = \frac{m(b^p - 1)}{4} = (m - 1)(mk + 1) \sum_{i = 0}^{p - 1} b^i</math> is a Kaprekar number.
- <math>X_2 = \frac{mb^p + 1}{4} = X_3 + 1</math> is a Kaprekar number.
b = m2k + m2 − m + 1 and p = mn + 1Edit
Let <math>m</math>, <math>k</math>, and <math>n</math> be natural numbers, the number base <math>b = m^2k + m^2 - m + 1</math>, and the power <math>p = mn + m - 1</math>. Then:
- <math>X_1 = \frac{(m - 1)(b^p - 1)}{m} = (m - 1)(mk + 1) \sum_{i = 0}^{p - 1} b^i</math> is a Kaprekar number.
- <math>X_2 = \frac{(m - 1)b^p + 1}{m} = X_1 + 1</math> is a Kaprekar number.
b = m2k + m2 − m + 1 and p = mn + m − 1Edit
Let <math>m</math>, <math>k</math>, and <math>n</math> be natural numbers, the number base <math>b = m^2k + m^2 - m + 1</math>, and the power <math>p = mn + m - 1</math>. Then:
- <math>X_1 = \frac{b^p - 1}{m} = (mk + 1) \sum_{i = 0}^{p - 1} b^i</math> is a Kaprekar number.
- <math>X_2 = \frac{b^p + m - 1}{m} = X_3 + 1</math> is a Kaprekar number.
Kaprekar numbers and cycles of <math>F_{p, b}</math> for specific <math>p</math>, <math>b</math>Edit
All numbers are in base <math>b</math>.
Base <math>b</math> | Power <math>p</math> | Nontrivial Kaprekar numbers <math>n \neq 0</math>, <math>n \neq 1</math> | Cycles |
---|---|---|---|
2 | 1 | 10 | <math>\varnothing</math> |
3 | 1 | 2, 10 | <math>\varnothing</math> |
4 | 1 | 3, 10 | <math>\varnothing</math> |
5 | 1 | 4, 5, 10 | <math>\varnothing</math> |
6 | 1 | 5, 6, 10 | <math>\varnothing</math> |
7 | 1 | 3, 4, 6, 10 | <math>\varnothing</math> |
8 | 1 | 7, 10 | 2 → 4 → 2 |
9 | 1 | 8, 10 | <math>\varnothing</math> |
10 | 1 | 9, 10 | <math>\varnothing</math> |
11 | 1 | 5, 6, A, 10 | <math>\varnothing</math> |
12 | 1 | B, 10 | <math>\varnothing</math> |
13 | 1 | 4, 9, C, 10 | <math>\varnothing</math> |
14 | 1 | D, 10 | <math>\varnothing</math> |
15 | 1 | 7, 8, E, 10 |
2 → 4 → 2 9 → B → 9 |
16 | 1 | 6, A, F, 10 | <math>\varnothing</math> |
2 | 2 | 11 | <math>\varnothing</math> |
3 | 2 | 22, 100 | <math>\varnothing</math> |
4 | 2 | 12, 22, 33, 100 | <math>\varnothing</math> |
5 | 2 | 14, 31, 44, 100 | <math>\varnothing</math> |
6 | 2 | 23, 33, 55, 100 |
15 → 24 → 15 41 → 50 → 41 |
7 | 2 | 22, 45, 66, 100 | <math>\varnothing</math> |
8 | 2 | 34, 44, 77, 100 |
4 → 20 → 4 11 → 22 → 11 45 → 56 → 45 |
2 | 3 | 111, 1000 | 10 → 100 → 10 |
3 | 3 | 111, 112, 222, 1000 | 10 → 100 → 10 |
2 | 4 | 110, 1010, 1111, 10000 | <math>\varnothing</math> |
3 | 4 | 121, 2102, 2222, 10000 | <math>\varnothing</math> |
2 | 5 | 11111, 100000 |
10 → 100 → 10000 → 1000 → 10 111 → 10010 → 1110 → 1010 → 111 |
3 | 5 | 11111, 22222, 100000 | 10 → 100 → 10000 → 1000 → 10 |
2 | 6 | 11100, 100100, 111111, 1000000 |
100 → 10000 → 100 1001 → 10010 → 1001 100101 → 101110 → 100101 |
3 | 6 | 10220, 20021, 101010, 121220, 202202, 212010, 222222, 1000000 |
100 → 10000 → 100 122012 → 201212 → 122012 |
2 | 7 | 1111111, 10000000 |
10 → 100 → 10000 → 10 1000 → 1000000 → 100000 → 1000 100110 → 101111 → 110010 → 1010111 → 1001100 → 111101 → 100110 |
3 | 7 | 1111111, 1111112, 2222222, 10000000 |
10 → 100 → 10000 → 10 1000 → 1000000 → 100000 → 1000 1111121 → 1111211 → 1121111 → 1111121 |
2 | 8 | 1010101, 1111000, 10001000, 10101011, 11001101, 11111111, 100000000 | <math>\varnothing</math> |
3 | 8 | 2012021, 10121020, 12101210, 21121001, 20210202, 22222222, 100000000 | <math>\varnothing</math> |
2 | 9 | 10010011, 101101101, 111111111, 1000000000 |
10 → 100 → 10000 → 100000000 → 10000000 → 100000 → 10 1000 → 1000000 → 1000 10011010 → 11010010 → 10011010 |
Extension to negative integersEdit
Kaprekar numbers can be extended to the negative integers by use of a signed-digit representation to represent each integer.
See alsoEdit
- Arithmetic dynamics
- Automorphic number
- Dudeney number
- Factorion
- Happy number
- Kaprekar's constant
- Meertens number
- Narcissistic number
- Perfect digit-to-digit invariant
- Perfect digital invariant
- Sum-product number