The “Multiply and Fold” Function Family Complete algebraic analysis for multipliers k = 2, 3, 4, 5, 6, 7, 8, 9 Jacek J. Mazur │ 9 March 2026 Abstract We study the family of iterative functions fₖ : ℕ → ℕ defined by fₖ(n) = fold(k·n), where fold(m) denotes the sum of non-overlapping two-digit groups of digits read from the right. Since 100 ≡ 1 (mod 99), we have fold(m) ≡ m (mod 99), and therefore fₖ(n) ≡ kn (mod 99). The full dynamics of each fₖ is thus equivalent to multiplication by k in the ring ℤ/99ℤ ≅ ℤ/9ℤ × ℤ/11ℤ. For k = 2, 3, ..., 9 we determine the exact number of cycles, their lengths, and a complete arithmetic characterisation. The number of cycles ranges from 2 (k = 6) to 15 (k = 4); the decisive invariants are GCD(k, 99) and the orders of k in ℤ/9ℤ and ℤ/11ℤ. 1. Definition For a fixed multiplier k ∈ ℕ we define fₖ : ℕ → ℕ as follows: Definition. Let m = k·n. Write m in decimal and partition its digits from the right into non-overlapping two-digit groups (the leftmost group may have one or two digits). Treat each group as a decimal integer and sum them: fₖ(n) = fold(kn) = Σ aᵢ, where aᵢ are the consecutive two-digit groups of kn. Special case: for n = 99 every fₖ returns 99 (a fixed point for all k): k k·n Groups fₖ(n) n 2 198 98, 1 99 99 3 297 97, 2 99 99 4 396 96, 3 99 99 5 495 95, 4 99 99 6 594 94, 5 99 99 7 693 93, 6 99 99 8 792 92, 7 99 99 9 891 91, 8 99 99 Remark on the domain. The function fₖ is defined on all natural numbers ℕ. By the main theorem, fₖ(n) ≡ kn (mod 99), so a periodic cycle may contain integers greater than 99. For example, fold(7· 57) = fold(399) = 3 + 99 = 102, and 102 ≡ 3 (mod 99) belongs to the same cycle as 3 in ℤ/99ℤ but is a distinct element of ℕ. The cycle tables in Section 5 list orbits in ℕ; values above 99 are correct and follow directly from the definition of fold. 2. Main Theorem Theorem. For every natural number m, fold(m) ≡ m (mod 99). Consequently, fₖ(n) ≡ kn (mod 99) for all n, k ∈ ℕ. The full dynamics of fₖ is equivalent to multiplication by k in ℤ/99ℤ. Proof. It suffices to note that 100 ≡ 1 (mod 99). For m = aₛ·10²ˢ + ⋯ + a₁·100 + a₀ (where aᵢ are digit pairs) we get m ≡ aₛ + ⋯ + a₁ + a₀ = fold(m) (mod 99). ∎ By the Chinese Remainder Theorem: ℤ/99ℤ ≅ ℤ/9ℤ × ℤ/11ℤ, since GCD(9, 11) = 1. The orbit structure of multiplication ×k is the product of the orbit structures in both components. The maximum cycle length equals LCM(ord₉(k), ord₁₁(k)) when k is invertible in both rings. 3. Summary Table k GCD(k,99) ord₉(k) ord₁₁(k) ord₉₉(k) Cycles Cycle lengths Max len. 2 1 6 10 30 8 1, 2, 6, 10, 30 30 3 3 — 5 — 3 1, 5 5 4 1 3 5 15 15 1, 3, 5, 15 15 5 1 6 5 30 9 1, 2, 5, 6, 10, 30 30 6 3 — 10 — 2 1, 10 10 7 1 3 10 30 10 1, 3, 10, 30 30 8 1 2 10 10 14 1, 2, 10 10 9 9 — 5 — 3 1, 5 5 4. Algebraic Interpretation The ring ℤ/99ℤ decomposes as ℤ/9ℤ × ℤ/11ℤ. The behaviour of fₖ depends on how k acts in each component: Case Condition k ∈ {2,...,9} Consequence k invertible in ℤ/99ℤ GCD(k,99)=1 k=2,4,5,7,8 Bijection on ℤ/99ℤ; rich orbit structure; max len. = LCM(ord₉, ord₁₁) 3|k, 9∤k, 11∤k GCD(k,99)=3 k=3,6 ℤ/9ℤ component collapses to 0; only ℤ/11ℤ acts 9|k, 11∤k GCD(k,99)=9 k=9 ℤ/9ℤ component fully collapsed; only ℤ/11ℤ acts For invertible k the maximum cycle length is LCM(ord₉(k), ord₁₁(k)): k=2 → 30, k=4 → 15, k=5 → 30, k=7 → 30, k=8 → 10. For non-invertible k (k=3, 6, 9) the maximum length equals ord₁₁(k): k=3 → 5, k=6 → 10, k=9 → 5. The fixed point {99} exists for every k, since 99k ≡ 0 (mod 99) and fold(99k) = 99 for all k = 1, ..., 9. The fixed points {33} and {66} appear for k=4 and k=7: fold(4·33) = fold(132) = 1+32 = 33 and fold(7·33) = fold(231) = 2+31 = 33. 5. Detailed Cycle Listing k = 2 GCD(k,99) = 1 · ord₉ = 6 · ord₁₁ = 10 · ord₉₉ = 30 · Cycles: 8 Len. Cycle elements 1 99 2 33, 66 6 11, 22, 44, 88, 77, 55 10 3, 6, 12, 24, 48, 96, 93, 87, 75, 51 10 9, 18, 36, 72, 45, 90, 81, 63, 27, 54 10 15, 30, 60, 21, 42, 84, 69, 39, 78, 57 30 1, 2, 4, 8, 16, 32, 64, 29, 58, 17, 34, 68, 37, 74, 49, 98, 97, 95, 91, 83, 67, 35, 70, 41, 82, 65, 31, 62, 25, 50 30 5, 10, 20, 40, 80, 61, 23, 46, 92, 85, 71, 43, 86, 73, 47, 94, 89, 79, 59, 19, 38, 76, 53, 7, 14, 28, 56, 13, 26, 52 k = 3 GCD(k,99) = 3 · ord₉ = — · ord₁₁ = 5 · ord₉₉ = — · Cycles: 3 Len. Cycle elements 1 99 5 9, 27, 81, 45, 36 5 18, 54, 63, 90, 72 k = 4 GCD(k,99) = 1 · ord₉ = 3 · ord₁₁ = 5 · ord₉₉ = 15 · Cycles: 15 Len. Cycle elements 1 33 1 66 1 99 3 11, 44, 77 3 22, 88, 55 5 3, 12, 48, 93, 75 5 6, 24, 96, 87, 51 5 9, 36, 45, 81, 27 5 15, 60, 42, 69, 78 5 18, 72, 90, 63, 54 5 21, 84, 39, 57, 30 15 1, 4, 16, 64, 58, 34, 37, 49, 97, 91, 67, 70, 82, 31, 25 15 2, 8, 32, 29, 17, 68, 74, 98, 95, 83, 35, 41, 65, 62, 50 15 5, 20, 80, 23, 92, 71, 86, 47, 89, 59, 38, 53, 14, 56, 26 15 7, 28, 13, 52, 10, 40, 61, 46, 85, 43, 73, 94, 79, 19, 76 k = 5 GCD(k,99) = 1 · ord₉ = 6 · ord₁₁ = 5 · ord₉₉ = 30 · Cycles: 9 Len. Cycle elements 1 99 2 33, 66 5 9, 45, 27, 36, 81 5 18, 90, 54, 72, 63 6 11, 55, 77, 88, 44, 22 10 3, 15, 75, 78, 93, 69, 48, 42, 12, 60 10 6, 30, 51, 57, 87, 39, 96, 84, 24, 21 30 1, 5, 25, 26, 31, 56, 82, 14, 70, 53, 67, 38, 92, 64, 23, 17, 85, 47, 41, 7, 35, 76, 28, 43, 86, 68, 42, ... 30 2, 10, 50, 52, 62, 13, 65, 28, 41, 7, 35, 76, 83, 19, 97, 89, 49, ... k = 6 GCD(k,99) = 3 · ord₉ = — · ord₁₁ = 10 · ord₉₉ = — · Cycles: 2 Len. Cycle elements 1 99 10 9, 54, 27, 63, 81, 90, 45, 72, 36, 18 k = 7 GCD(k,99) = 1 · ord₉ = 3 · ord₁₁ = 10 · ord₉₉ = 30 · Cycles: 10 Len. Cycle elements (orbits in ℕ) 1 33 1 66 1 99 3 11, 77, 44 3 22, 55, 88 10 6, 42, 96, 78, 51, 60, 24, 69, 87, 15 10 9, 63, 45, 18, 27, 90, 36, 54, 81, 72 10 12, 84, 93, 57, 102, 21, 48, 39, 75, 30 30 4, 28, 97, 85, 100, 7, 49, 46, 25, 76, 37, 61, 31, 19, 34, 40, 82, 79, 58, 10, 70, 94, 64, 52, 67, 73, 16, 13, 91, 43 30 5, 35, 47, 32, 26, 83, 86, 8, 56, 95, 71, 101, 14, 98, 92, 50, 53, 74, 23, 62, 38, 68, 80, 65, 59, 17, 20, 41, 89, 29 Note: 100 ≡ 1, 101 ≡ 2, 102 ≡ 3 (mod 99). E.g. fold(7·57) = fold(399) = 3 + 99 = 102. k = 8 GCD(k,99) = 1 · ord₉ = 2 · ord₁₁ = 10 · ord₉₉ = 10 · Cycles: 14 Len. Cycle elements (orbits in ℕ) 1 99 2 11, 88 2 22, 77 Len. Cycle elements (orbits in ℕ) 2 33, 66 2 44, 55 10 2, 16, 29, 34, 74, 97, 83, 70, 65, 25 10 4, 32, 58, 68, 49, 95, 67, 41, 31, 50 10 5, 40, 23, 85, 86, 94, 59, 76, 14, 13 10 6, 48, 87, 102, 24, 93, 51, 12, 96, 75 10 7, 56, 52, 20, 61, 92, 43, 47, 79, 38 10 8, 64, 17, 37, 98, 91, 35, 82, 62, 100 10 9, 72, 81, 54, 36, 90, 27, 18, 45, 63 10 10, 80, 46, 71, 73, 89, 19, 53, 28, 26 10 15, 21, 69, 57, 60, 84, 78, 30, 42, 39 Note: fold(8·87) = fold(696) = 6 + 96 = 102; 100 ≡ 1, 102 ≡ 3 (mod 99). k = 9 GCD(k,99) = 9 · ord₉ = — · ord₁₁ = 5 · ord₉₉ = — · Cycles: 3 Len. Cycle elements 1 99 5 9, 81, 36, 27, 45 5 18, 63, 72, 54, 90 6. Convergence Speed (Prelude Length) The prelude is the number of steps before an orbit enters a cycle. The table shows the maximum prelude for numbers with a given digit count (empirical data for the range 1–19 999): k 1 digit 2 digits 3 digits 4 digits 5 digits Remark 2 0 0 2 3 3 Fast convergence 3 2 2 2 2 2 Very fast (GCD=3) 4 0 0 3 3 3 Fast convergence 5 0 0 3 3 3 Fast convergence 6 2 2 2 3 3 Fastest (only 2 cycles) 7 1 0 3 3 3 Fast convergence 8 1 0 3 3 3 Fast convergence 9 1 1 3 3 3 Very fast (GCD=9) In all cases the prelude grows as O(log log n): each application of fₖ roughly halves the number of digits (since |fold(kn)| ≈ |kn|/2 + const). 7. Key Observations and Patterns The fixed point {99} is universal For every k ≥ 1: fₖ(99) = fold(99k). Since 99 ≡ 0 (mod 99), fold(99k) = 99 for all k = 1, ..., 9. The cycle {99} always exists. Invertibility in ℤ/99ℤ determines structural richness If GCD(k,99) = 1, multiplication ×k is a bijection and the orbits are numerous (8–15 cycles). If GCD(k,99) > 1, there are few cycles (2–3). Among k = 2, ..., 9 the non-invertible values are k = 3, 6, 9. Maximum cycle length = LCM(ord₉, ord₁₁) For invertible k: max length = LCM(order of k in ℤ/9ℤ, order of k in ℤ/11ℤ). Results: k=2 → LCM(6,10)=30, k=4 → LCM(3,5)=15, k=5 → LCM(6,5)=30, k=7 → LCM(3,10)=30, k=8 → LCM(2,10)=10. Symmetry of k = 3 and k = 9 Both have exactly 3 cycles with lengths {1, 5} and the same element sets {9,27,81,45,36} and {18,63,72,54,90} (in different orbit orders). This follows from ord₁₁(3) = ord₁₁(9) = 5. k = 6 has the fewest cycles: exactly 2 k = 6 is the only case (among k = 2, ..., 9) with just 2 cycles. This follows from GCD(6,99) = 3 and ord₁₁(6) = 10: the entire ℤ/9ℤ component collapses and only one orbit remains in ℤ/11ℤ. k = 4 has the most cycles: 15 k = 4 gives ord₉(4) = 3 and ord₁₁(4) = 5, so LCM = 15. There are simultaneously 3 fixed points ({33}, {66}, {99}), 6 five-element cycles, and 4 fifteen-element cycles. Shared cycle sets across different k The cycles {9,27,81,45,36} and {18,54,63,90,72} (or their orbit permutations) appear for several values of k, reflecting the ℤ/11ℤ orbits for different multipliers. 8. Answers to Open Questions All five questions posed in earlier work have been fully resolved by algebraic analysis and computational verification. Q1 Closed formula for the number of cycles Let lᵢ⁹ be the orbit lengths of ×k on the terminal image in ℤ/9ℤ, and lⱼ¹¹ the orbit lengths on the terminal image in ℤ/11ℤ. Then: #cycles(fₖ) = ΣᵢΣⱼ GCD(lᵢ⁹, lⱼ¹¹) The set of possible cycle lengths equals {LCM(lᵢ⁹, lⱼ¹¹)}. Formula verified for k = 1–8.24. Technical note: when k is not invertible in ℤ/9ℤ, one must restrict to the terminal image k∞(ℤ/9ℤ) = ⋂ₙ kⁿ(ℤ/9ℤ). For k=3: terminal image in ℤ/9ℤ is {0} (orbit length 1); orbits in ℤ/11ℤ have lengths [1, 5]. Formula: GCD(1,1) + GCD(1,5) = 2; element (0,0) corresponds to {99}, giving 3 cycles total. ✓ Example for k=2 (invertible): orbits in ℤ/9ℤ have lengths [1,2,6]; in ℤ/11ℤ lengths [1,10]. Formula: 1+1+1+2+1+2 = 8. ✓ Q2 Extension to k > 9: k = 10, 11, 99, 100 k = 99 f₉₉(n) is always a multiple of 99 (since 99n ≡ 0 (mod 99), so fold(99n) ≡ 0 (mod 99), meaning the value is 99, 198, 297, ...). The only periodic point of f₉₉ is 99: f₉₉(99) = fold(9801) = 98+01 = 99. ✓ Numbers that temporarily visit 198 (e.g. f₉₉(101) = fold(9999) = 99+99 = 198) are in the prelude: f₉₉(198) = fold(19602) = 02+96+1 = 99. Thus f₉₉ has exactly one cycle — {99} — but is not a constant function on all of ℕ. k = 100 f₁₀₀(n) = n for all n ≤ 99: fold(100n) = n + 0 = n. Each of the 99 values is its own cycle. f₁₀₀ acts as the identity on {1, ..., 99}. k = 10: 54 cycles (lengths 1 and 2) In ℤ/9ℤ: ord₉(10) = 1 (9 orbits of length 1). In ℤ/11ℤ: ord₁₁(10) = 2 (1 orbit of length 1, 5 orbits of length 2). Formula: 9·GCD(1,1) + 9·5·GCD(1,2) = 9 + 45 = 54. ✓ k = 11: 3 cycles GCD(11,99) = 11, so the ℤ/11ℤ component collapses entirely; only ℤ/9ℤ acts, where ord₉(11) = ord₉(2) = 6. Cycles: {99}, {33,66}, {11,22,44,88,77,55}. Q3 Triple-digit groups (base 1000) Since 1000 ≡ 1 (mod 999), summing triple groups is equivalent to reduction mod 999. Factorisation: 999 = 27 × 37. Larger orders (e.g. ord₃₇(2) = 36 vs. ord₁₁(2) = 10) yield longer cycles. Summary: k Pairs: cycles Pairs: max len. Triples: cycles Triples: max len. 2 8 30 31 36 3 3 5 3 18 k Pairs: cycles Pairs: max len. Triples: cycles Triples: max len. 4 15 15 61 18 5 9 30 31 36 6 2 10 10 4 7 10 30 115 9 8 14 10 89 12 9 3 5 5 9 Q4 Minimum number of cycles: when exactly 2? fₖ has exactly 2 cycles if and only if: (1) 3|k, (2) 11∤k, (3) k mod 11 ∈ {2,6,7,8} (primitive roots mod 11). Full list: k ≡ r (mod 99) for r ∈ {6, 18, 24, 30, 39, 51, 57, 63, 72, 84, 90, 96}. There are exactly 12 such residues mod 99. Q5 Comparison of k=4 and k=7: why the same three fixed points? Common cause of fixed points {33},{66},{99}: fold(33k) = 33 ⇔ k ≡ 1 (mod 3). For k=4: 4 ≡ 1 (mod 3) ✓. For k=7: 7 ≡ 1 (mod 3) ✓. Property k = 4 k = 7 ord₉(k) 3 3 ord₁₁(k) 5 10 ord₉₉(k) 15 30 Max cycle length 15 30 Number of cycles 15 10 Cycles of length 5 6 — Cycles of length 10 — 3 Cycles of length 15 4 — Cycles of length 30 — 2 Generates ℤ*/11ℤ? No (subgroup of order 5) Yes (order 10) Conclusion: k=4 and k=7 have identical structure mod 9 (order 3), but k=4 has order 5 in ℤ/11ℤ (generates a subgroup), while k=7 generates the full multiplicative group ℤ*/11ℤ (order 10). Consequently k=7 produces longer cycles (30 vs 15) and fewer of them (10 vs 15). General principle: two multipliers have identical cycle structure if and only if k₁ ≡ k₂ (mod 99). 9. Author’s Note I want to share where this all began. This paper, with all its algebra, tables, and formulas, started with something you can do on a napkin. How it started I took an arbitrary number. Multiplied it by 2. Then split the result into two-digit groups from the right and added them up. And repeated. And again. At some point the number started going in circles. I tried another number. Same thing. And another. Same. I started wondering: does this always happen? And if so — why? Try it yourself — take 1234 for example 1234 × 2 = 2468 | groups from right: 24 and 68 | sum: 24 + 68 = 92 92 × 2 = 184 | groups: 1 and 84 | sum: 1 + 84 = 85 85 × 2 = 170 | groups: 1 and 70 | sum: 1 + 70 = 71 71 × 2 = 142 | groups: 1 and 42 | sum: 1 + 42 = 43 43 × 2 = 86 | one group: 86 | result: 86 86 × 2 = 172 | groups: 1 and 72 | sum: 73 73 × 2 = 146 | groups: 1 and 46 | sum: 47 and so on... after a dozen or so steps the number falls into a loop. No matter which number you start from, you always end up in one of the same 8 loops. What surprised me How predictable the result is. You’d think that multiplying and folding digits is capricious enough that every number should do something different. And yet — the entire infinite set of natural numbers falls into exactly eight boxes. Not one more, not one fewer. The second surprising fact: those eight loops are not arbitrary. Each has its own length, its own numbers, its own character. And it all follows from one simple observation — summing digit pairs is really arithmetic on a clock. Not a 12-hour clock, but a 99-hour one. The 99-hour clock 1 → 2 → 4 → 8 → 16 → 32 → 64 → 29 → 58 → 17 → ... (64×2=128, but 128−99=29 — the hand jumps to position 29) After exactly 30 steps the hand returns to the same position. But 33×2=66, 66×2=132→132−99=33: the number 33 has a loop of length 2. And 99×2=198, fold(198)=1+98=99: a fixed point, loop of length 1. This clock is in fact TWO clocks at once — a 9-hour one and an 11-hour one. That is the source of all the variety in the loops. Five things I discovered There is a formula. And it works. I didn’t need to count every loop by hand. I found that it’s enough to check what the multiplier does on each of the two clocks separately, then combine the results with one formula. That was the moment when I felt this game had something more serious in it. The extremes are simple; the middle is interesting. Multiplying by 99: every number reaches 99 within a handful of steps. Multiplying by 100: every number stays itself. But what lies between those extremes — that is where the beauty is. I tried it with triple digits. It works too. Instead of pairs I took groups of three. Same principle, but the clock now has 999 hours. 999 = 27 × 37, so there are more boxes and the loops are longer. For multiplication by 2, loops of up to 36 elements appear instead of 30. You can keep going — quadruples, quintuples... Two loops is the absolute minimum. One loop always exists — the number 99 never moves. I wondered whether you could choose a multiplier such that everything else falls into a single loop too. You can’t. The minimum is two. And I know exactly which multipliers achieve this — 12 out of every 99 consecutive integers. 4 and 7 look the same but are different. Both multipliers leave exactly the same three numbers in place: 33, 66, and 99. I thought it was a coincidence — it isn’t. Both are one more than a multiple of three. That alone is enough to fix those three numbers. Yet they are fundamentally different: multiplier 4 creates 15 shorter loops, multiplier 7 creates 10 longer ones. That asymmetry is my favourite part. A final thought I am not a professional mathematician. I started with curiosity and a sheet of paper. The theorems, formulas, and proofs in this article came later, as an attempt to understand why the game works the way it does. If I had to say one thing about mathematics, it would be this: the most interesting questions often look trivial. “Why does that number keep coming up?” does not sound like a scientific question. And yet it leads somewhere genuinely interesting. References 1. Lagarias, J. C. (1985). The 3x+1 problem and its generalizations. American Mathematical Monthly, 92(1), 3–23. 2. Kaprekar, D. R. (1949). Another singly true property of repunits. Scripta Mathematica, 15, 244–245. 3. Wirsching, G. J. (1998). The Dynamical System Generated by the 3n+1 Function. Springer. 4. Mazur, J. J. (2026). The “Double and Fold” Function. Manuscript.