Lably
Skip to content

Kaprekar number

  • 3 min read
  • 4 chapters

Related on Lably

Through Mathematics, Natural number and Decimal

Definition and properties

Let n be a natural number. Then the Kaprekar function for base b>1 and power p>0 Fp,b:N→N is defined to be the following:

Fp,b(n)=α+β,

where β=n2modbp and

α=n2−βbp

A natural number n is a p-Kaprekar number if it is a fixed point for Fp,b, which occurs if Fp,b(n)=n. 0 and 1 are trivial Kaprekar numbers for all b and p, all other Kaprekar numbers are nontrivial Kaprekar numbers.

The earlier example of 45 satisfies this definition with b=10 and p=2, because

β=n2modbp=452mod102=25
α=n2−βbp=452−25102=20
F2,10(45)=α+β=20+25=45

A natural number n is a sociable Kaprekar number if it is a periodic point for Fp,b, where Fp,bk(n)=n for a positive integer k (where Fp,bk is the kth iterate of Fp,b), and forms a cycle of period k. A Kaprekar number is a sociable Kaprekar number with k=1, and a amicable Kaprekar number is a sociable Kaprekar number with k=2.

The number of iterations i needed for Fp,bi(n) to reach a fixed point is the Kaprekar function's persistence of n, and undefined if it never reaches a fixed point.

There are only a finite number of p-Kaprekar numbers and cycles for a given base b, because if n=bp+m, where m>0 then

n2=(bp+m)2=b2p+2mbp+m2=(bp+2m)bp+m2

and β=m2, α=bp+2m, and Fp,b(n)=bp+2m+m2=n+(m2+m)>n. Only when n≤bp do Kaprekar numbers and cycles exist.

If d is any divisor of p, then n is also a p-Kaprekar number for base bp.

In base b=2, all even perfect numbers are Kaprekar numbers. More generally, any numbers of the form 2n(2n+1−1) or 2n(2n+1+1) for natural number n are Kaprekar numbers in base 2.

Set-theoretic definition and unitary divisors

The set K(N) for a given integer N can be defined as the set of integers X for which there exist natural numbers A and B satisfying the Diophantine equation

X2=AN+B, where 0≤B<N
X=A+B

An n-Kaprekar number for base b is then one which lies in the set K(bn).

It was shown in 2000 that there is a bijection between the unitary divisors of N−1 and the set K(N) defined above. Let Inv⁡(a,c) denote the multiplicative inverse of a modulo c, namely the least positive integer m such that am=1modc, and for each unitary divisor d of N−1 let e=N−1d and ζ(d)=dInv(d,e). Then the function ζ is a bijection from the set of unitary divisors of N−1 onto the set K(N). In particular, a number X is in the set K(N) if and only if X=dInv(d,e) for some unitary divisor d of N−1.

The numbers in K(N) occur in complementary pairs, X and N−X. If d is a unitary divisor of N−1 then so is e=N−1d, and if X=dInv⁡(d,e) then N−X=eInv⁡(e,d).

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Mathematics