Contributions came from Jan van Delden, Emmanuel Vantieghem and Shyam S.
[Which we will use with N=10^k for some
Theorem by Ianucci (2000):
A number X is a Kaprekar number if and
only if X=d*m with m=Inv(d,(N-1)/d), with Inv(a,b) the
multiplicative inverse of a mod b and d an unitary divisor of N-1.
Given (a,b)=1: Inv(a,b)=m is defined by
the smallest value 0<m<b such that a*m=1 mod b.
We search X=d*m, with X prime and N=10^k.
We must have that either:
d=1 and m=p (prime) or
m=1 and d=p (prime).
d=1: m=Inv(1,N-1) or m=1 mod (N-1), so
m=1 giving X=1 (not prime)
d=p: m=1=Inv(p,(N-1)/p) or p=1 mod
Since p and (N-1)/p are odd we must have
that p=(2t)(N-1)/p+1 (t>=1) or p>2(N-1)/p or p^2>2(N-1)>N-1.
Thus p must be the largest prime divisor
of N-1 having at least half the number of digits of 2(N-1).
Write N-1=9*R[k], with R[k] the repunit
having k digits.
Write R[k]=3^a*B[k] where a is the
multiplicity of the factor 3 in R[k]
Since p cannot be 3 (it is not a unitary
divisor of N-1):
p=1 mod ((N-1)/p) or p=1 mod (3^(2+a) *
p=1 mod (3^(2+a)) and
p=1 mod (B[k]/p)
If R[k] is prime, choose p=R[k], we have
a=0 and B[k]=R[k] and get R[k]=1 mod 9 or k=1 mod 9.
The first prime solution has k=19.
The other known (probable) prime repunits having this property are:
R probably prime (Harvey Dubner,
april 3 2007)
R probably prime (Maksym Voznyy,
july 15 2007)
The next one (when found) has k>2500000.
[Source: sequence A004023
If R[k] is not prime I used the
factorisations of R[k] given by Yousuke
Koide and checked
I found no other solutions.
In short, prime Kaprekar may be other than certain prime repunits?...
1) If k is a
Kaprekar number we have :
k = a+b and
k^2 = b + a 10^n.
Modulo 9 this leads
k^2 = k (mod 9)
or k(k-1) = 0 (mod 9).
If in addition k
is prime (and thus > 3), then it follows k = 1 (mod 9).
2) On the other
hand, it is a well known property that any Kaprekar number k
can be written as a product
d * u
where d is a
unitary divisor of N = 10^n - 1 (that is a divisor of N that
has no divisor in common with N/d)
and u is the
smallest among all positive numbers x that have the property
d*x = 1 (mod N/d).
The converse is
3) Suppose r is a
repunit with s ones, s = 1 (mod 9).
Thus : r = (10^s -
1)/9, i.e. : r is a divisor of S = (10^s - 1)
and it is also a
unitary divisor of S, since S/r = 9 has no divisor in common
r = 1 (mod S/s).
Hence, r is a
Kaprekar number with u = 1.
Conclusion : when a
repunit which is = 1 (mod 9) is prime; then it is a Kaprekar
is only one proved prime repunit : R(19).
A004023, the other candidates are R(109297) and R(270343)
which are probable primes.
Of course, there
might exist prime divisors d of N =10^n - 1 that are not
repunits but that satisfy d = 1 (mod N/d).
These numbers would
be Kaprekar numbers when they are unitary divisors. But I could
not find such one neither I could prove they do not exist