There is a newer version of the record available.

Published November 19, 2026 | Version 1.7

Kaprekar dynamics: papers, verification code and data

Authors/Creators

Description

Version 1.7 of the code and data record for research on Kaprekar's routine (iterating the descending-minus-ascending digit arrangement) in arbitrary integer bases.

Added in this version: the paper Arithmetic selection of arrival times in eleven-digit Kaprekar dynamics (R. Galyavin, 2026), with its LaTeX source and ancillary bundle. For a uniformly random nonconstant eleven-digit word in base B, the joint law of the normalized input and the scaled arrival time T_B/B depends on the arithmetic of B. A fixed bounded test separates the subsequential limits along bases congruent to 0 and 1 modulo 6, so this joint law has no limit through all bases. On a small rectangle of initial gaps the conditional joint law converges along each class of B modulo 6 to six distinct explicit mixtures of affine clock graphs, so the joint law converges along no progression whose modulus is not divisible by 6. On a second box the conditional joint law converges along each of the classes B ≡ 5 and B ≡ 11 (mod 12) to two distinct explicit laws whose largest difference on [0,1]-valued tests is 17/7128; hence a system of limits along the classes modulo N would require 12 to divide N. Whether the full joint law converges along the classes modulo 12 remains open. The proofs use computer-assisted certificates of affine routes and their lattice weights.

Added in version 1.6: the paper Linear-time access for eleven-digit Kaprekar dynamics (R. Galyavin, 2026), with its LaTeX source and ancillary bundle. For a uniformly random nonconstant eleven-digit word in base B, with probability tending to one through all bases, the six gaps between the symmetric digit differences are simultaneously at least ⌈(B+1)/7⌉ + 64 within 4509B subtractions. Consequently the time to the first cyclic word, divided by B, is tight, and the normalized differences of that word converge in probability to (5,4,3,2,1)/6. Exact cycles that never reach this gap condition exist for bases congruent to 0, 1 or 2 modulo 5. The proof combines almost-everywhere entry for the continuous leading map with a stopped energy estimate; its computer-assisted steps include an independent exhaustion of the periodic catalogue with exact rational infeasibility certificates.

Added in version 1.5: the paper Seven-digit Kaprekar dynamics: global law, two clocks, parity (R. Galyavin, 2026), with its LaTeX source and ancillary bundle. For a uniformly chosen nonconstant seven-digit word in base B, the normalized starting differences and the arrival time divided by B have a joint limit along the bases of each parity. At almost every starting point the limiting time takes one of two values; the faster one has probability 3/8 in odd bases and 1/2 or 3/4 in even bases. Every arrival time is at most 54B + 614132 for B ≥ 400, and at first arrival the normalized differences lie within 34/B of (3/4, 1/2, 1/4). The proofs use an almost-everywhere entry theorem, exact integer returns and computer-assisted affine inequalities.

Correction in version 1.4: the cycles paper was revised to credit earlier work by M. Kahramanlar (the bases 3·2k, Zenodo, July 2026) and an anonymous preprint that stated the classification of the additional cycles as a conjecture (GitHub, August 2026).

From earlier versions: Cycles of the four-digit Kaprekar map in even bases (version 1.0, with a Lean 4 proof); Arrival times for the four-digit Kaprekar map in even bases (version 1.1), including the fixed-point basin limits 1033/1125 and 94/125 in the bases 5·2n, against the values 3/4 and 15/16 conjectured by Devlin and Zeng; A common arrival-time law for five-digit Kaprekar dynamics (version 1.2), with Lean 4 verification of its finite claims; and Majorization in odd-digit Kaprekar dynamics and the nine-digit arrival law (version 1.3), with five distinct nine-digit limits indexed by the base modulo 5.

Files. Each paper as PDF and LaTeX source, with its ancillary bundle of reproduction scripts and reference results; the bundles of the cycles paper and the five-digit paper also contain Lean 4 developments. Also LICENSE.md; COMMITMENTS.txt, which lists SHA-256 digests of unreleased research materials as a priority record; and SHA256SUMS for all files.

Licenses. Text, figures and data: CC BY 4.0. Code: MIT. See LICENSE.md.

Prepared with substantial AI assistance under the author's direction and close supervision; the author takes responsibility for the contents.

Contact: rustem@galyavin.com

Files

COMMITMENTS.txt

Files (14.4 MB)

Name Size
md5:d1f76d488089ab3b751c82337d6adc65
689 Bytes Preview Download
md5:bbcc584248250268a24be4e7e5636e30
40.2 kB Preview Download
md5:e8d988bb1e129323bb0c31d39c3ccd56
162.2 kB Preview Download
md5:6f62d8e476b9d9f7098f9459fb0eaf6c
36.9 kB Download
md5:5aff7d813f7957387596942a5a304bad
59.9 kB Preview Download
md5:b11f2e9a3e868afa0525bd6ab9f3be74
139.2 kB Preview Download
md5:43c775de6dcce379af1cd67866f9930b
32.5 kB Download
md5:94df4f9dd6d4c7255560fe1a3c90a976
10.7 MB Preview Download
md5:2344b953a6f5fed2f5aec19992399e28
202.9 kB Preview Download
md5:4a1cae057a77706e3e26e0557ea31ae0
78.9 kB Download
md5:8d35a401d5cd74743b47bce3ff18937a
278.4 kB Preview Download
md5:ea8283a7f4411cf82db167cb1b558710
247.7 kB Preview Download
md5:98422fe72ed59123f7163ad18b0d7b91
101.5 kB Download
md5:720274ce2a88601a33d46ab3caff077b
299.8 kB Preview Download
md5:45f7117492503be307e37ff9a0025782
180.8 kB Preview Download
md5:acbfa5d7931225fc34f35e84b156848d
53.5 kB Download
md5:360b3d782db0c9f248ee06ab2d8c970c
902.1 kB Preview Download
md5:f0f7926c9a6016b79663d53a3ecfbcd4
159.7 kB Preview Download
md5:7ab20992ddeae1ddeb60a71a7adf2f7d
45.6 kB Download
md5:da257190832d4dc944749520bcdd9d03
450.0 kB Preview Download
md5:08795746b855f7f20ae4ed6530d1c2bc
150.8 kB Preview Download
md5:ae91af4bc603a60bb1a50e7c5cfc659d
45.7 kB Download
md5:117d3d2879f04943c14d06ad1ac77280
2.0 kB Preview Download
md5:568ce6a4361f9c0711eddef0d1083f1d
2.3 kB Download

Additional details

Related works

Is supplemented by
Software: https://github.com/galyavin/kaprekar-dynamics (URL)
References
Journal article: arXiv:2606.20439 (arXiv)