5D Library › Modular Numerology, Character-Stroke Hashes and Residue-Class Distributions · 中文

Chapter 1. The Digital Root Is the Residue Modulo 9

Adding the digits of a number

The basic operation of the life path number is to add the digits of a number and, if the result has more than one digit, to add again, until a single digit is left. This is the digital root, and it has a simple closed form: for a positive integer nn,

dr(n)=1+((n−1)mod⁡9).\mathrm{dr}(n) = 1 + ((n – 1) \bmod 9).

The reason is that 10≡1(mod⁡9)10 \equiv 1 \pmod 9, so 10k≡110^k \equiv 1, and a number and the sum of its digits leave the same remainder on division by 9 (Hardy and Wright 2008). Old reckoners used this to “cast out nines” when checking sums and products: the digital root of a sum or product equals the digital root of the sum or product of the factors’ digital roots. In other words, the digital root is a homomorphism from the ring of integers to the ring of residues modulo 9, and it can be taken in any order and on any grouping before the arithmetic.

Calculation

# Chapter 1. The digital root is the residue modulo 9.
# dr(n) = 1 + ((n - 1) mod 9) for n >= 1. Repeated digit sums give the
# same value because 10 = 1 (mod 9), so a number and its digit sum leave
# the same remainder. The rule is a ring homomorphism, so it can be
# applied to the parts of a date in any order. The master-number rule
# (stop at 11, 22 or 33) is not: it reads digits, not residues.

def digit_sum(n):
    return sum(int(c) for c in str(n))

def reduce_plain(n):
    while n > 9:
        n = digit_sum(n)
    return n

def dr(n):
    return 1 + (n - 1) % 9

def reduce_master(n, masters=(11, 22, 33)):
    while n > 9 and n not in masters:
        n = digit_sum(n)
    return n

if __name__ == "__main__":
    N = 100000
    same = sum(reduce_plain(n) == dr(n) for n in range(1, N + 1))
    print("   iterated digit sum = 1 + (n-1) mod 9 for n = 1..{:,d}: {}"
          .format(N, same == N))
    add = all(dr(a + b) == dr(dr(a) + dr(b))
              for a in range(1, 300) for b in range(1, 300))
    mul = all(dr(a * b) == dr(dr(a) * dr(b))
              for a in range(1, 300) for b in range(1, 300))
    print("   dr(a+b) = dr(dr(a)+dr(b)): {};  dr(ab) = dr(dr(a)dr(b)): {}"
          .format(add, mul))
    print("\n   numbers with the same residue, under the master rule:")
    print("     n    residue  plain  master")
    for n in (11, 20, 29, 38, 47, 22, 13, 33, 15, 42):
        print("   {:4d}   {:5d}   {:5d}  {:6d}".format(
            n, n % 9, reduce_plain(n), reduce_master(n)))
    # a date read three ways: 26 February 1985
    y, m, d = 1985, 2, 26
    whole = digit_sum(y) + digit_sum(m) + digit_sum(d)
    parts = reduce_master(y) + reduce_master(m) + reduce_master(d)
    print("\n   26-02-1985: all digits summed = {} -> {};".format(
        whole, reduce_master(whole)))
    print("               parts reduced first = {} -> {};  plain dr = {}"
          .format(parts, reduce_master(parts), dr(y + m + d)))
    print("\nReading: the digital root is a residue and can be taken in any")
    print("order. The master rule gives 11 for 11, 29, 38 and 47 but 2 for")
    print("20, although all five leave remainder 2: it depends on the route")
    print("through the digits, so the same date can give 33 or 6.")
#    iterated digit sum = 1 + (n-1) mod 9 for n = 1..100,000: True
#    dr(a+b) = dr(dr(a)+dr(b)): True;  dr(ab) = dr(dr(a)dr(b)): True
#
#    numbers with the same residue, under the master rule:
#      n    residue  plain  master
#      11       2       2      11
#      20       2       2       2
#      29       2       2      11
#      38       2       2      11
#      47       2       2      11
#      22       4       4      22
#      13       4       4       4
#      33       6       6      33
#      15       6       6       6
#      42       6       6       6
#
#    26-02-1985: all digits summed = 33 -> 33;
#                parts reduced first = 15 -> 6;  plain dr = 6
#
# Reading: the digital root is a residue and can be taken in any
# order. The master rule gives 11 for 11, 29, 38 and 47 but 2 for
# 20, although all five leave remainder 2: it depends on the route
# through the digits, so the same date can give 33 or 6.

The program checks the closed form on the first hundred thousand positive integers and checks the homomorphism for addition and multiplication. One consequence follows at once: reducing the year, month and day of a birth date separately and then adding must give the same residue as adding all eight digits at once. With the digital root alone, a life path number does not depend on “how you add”.

The stopping rule for master numbers

Popular life path numerology keeps three “master numbers”, 11, 22 and 33, during reduction: once the digit sum equals one of them, it stops (Dudley 1997). This rule reads digits, not residues. The examples in the program show it: 11, 20, 29, 38 and 47 all leave remainder 2 on division by 9 and all have digital root 2; under the master rule 11, 29, 38 and 47 stop at 11 (the digits of 29 and 38 add to 11, and so do those of 47), and only 20 falls to 2.

So the life path number of a date depends on the route of the reduction. The program’s date, 26 February 1985: adding all eight digits at once gives 33, which stops as a master number; reducing year, month and day first and then adding gives 15, which becomes 6; the plain digital root is also 6. 33 and 6 are congruent, yet they are printed as two different numbers, and popular readings treat them as two different kinds of person.

Four published methods

Books and software use at least four methods:

  • A: add all the digits of the date, then reduce, stopping at 11, 22 or 33;
  • B: reduce year, month and day separately (keeping 11 and 22), add, then reduce, stopping at a master number;
  • C: add year, month and day as whole numbers (as in 1985 + 2 + 26), then reduce with the stopping rule;
  • D: the plain digital root, with no master numbers.

The next program compares them on every date from 1900 to 2099.

Calculation

# Chapter 1. Four published ways to compute a life path number.
# A  sum every digit of the date, then reduce, stopping at 11/22/33
# B  reduce year, month and day separately (keeping 11 and 22), add,
#    then reduce, stopping at 11/22/33
# C  add year + month + day as numbers, then reduce with the stop rule
# D  plain digital root, no master numbers
# All four agree modulo 9 on every date. We count, over every day from
# 1 January 1900 to 31 December 2099, how often they give different
# printed numbers.
import datetime as dt

MASTERS = (11, 22, 33)

def digit_sum(n):
    return sum(int(c) for c in str(n))

def red(n):
    while n > 9 and n not in MASTERS:
        n = digit_sum(n)
    return n

def conventions(y, m, d):
    a = red(digit_sum(y) + digit_sum(m) + digit_sum(d))
    b = red(red(y) + red(m) + red(d))
    c = red(y + m + d)
    e = 1 + (y + m + d - 1) % 9
    return {"A": a, "B": b, "C": c, "D": e}

def all_dates(y0=1900, y1=2099):
    d, end = dt.date(y0, 1, 1), dt.date(y1, 12, 31)
    while d <= end:
        yield d
        d += dt.timedelta(days=1)

if __name__ == "__main__":
    keys = "ABCD"
    n = 0
    master = {k: 0 for k in keys}
    differ = {(p, q): 0 for i, p in enumerate(keys) for q in keys[i + 1:]}
    mod_ok = True
    for day in all_dates():
        v = conventions(day.year, day.month, day.day)
        n += 1
        for k in keys:
            master[k] += v[k] in MASTERS
        for p, q in differ:
            differ[p, q] += v[p] != v[q]
        mod_ok &= len({x % 9 for x in v.values()}) == 1
    print("   {:,d} dates; all four agree modulo 9 on every date: {}"
          .format(n, mod_ok))
    print("   share of dates given a master number (11, 22 or 33):")
    for k in keys:
        print("     {}: {:.4f}".format(k, master[k] / n))
    print("   share of dates on which two conventions print different"
          " numbers:")
    for (p, q), c in differ.items():
        print("     {} vs {}: {:.4f}".format(p, q, c / n))
    print("\nReading: the conventions never disagree about the residue; they")
    print("disagree only about whether to stop at a master number, and the")
    print("same birthday is a master number under one rule and not another.")
#    73,049 dates; all four agree modulo 9 on every date: True
#    share of dates given a master number (11, 22 or 33):
#      A: 0.1476
#      B: 0.1002
#      C: 0.0956
#      D: 0.0000
#    share of dates on which two conventions print different numbers:
#      A vs B: 0.1420
#      A vs C: 0.1608
#      A vs D: 0.1476
#      B vs C: 0.1130
#      B vs D: 0.1002
#      C vs D: 0.0956
#
# Reading: the conventions never disagree about the residue; they
# disagree only about whether to stop at a master number, and the
# same birthday is a master number under one rule and not another.

The four methods are congruent on every date, as the homomorphism guarantees. Their disagreements come entirely from the stopping rule: under method A 0.1476 of dates receive a master number; under B and C 0.1002 and 0.0956; under D none. Compared in pairs, they print different numbers on at least 0.0956 and at most 0.1608 of dates. That is, for a birthday picked at random, the chance that two books or programs give different life path numbers lies between a tenth and a sixth, and this is not an error on either side but a difference of convention.

Note

What this means for software. A reading program should state which method it uses. If a user gets two different life path numbers from two programs, it is far more likely that they treat master numbers differently than that the birthday was mistyped. The test plan of Chapter 8 requires this choice to be registered in advance.

Summary

The digital root is the residue modulo 9, a ring homomorphism that can be computed in any order. The stopping rule for master numbers reads how the digits are written rather than the residue, so the same date can give 33 or 6 depending on what is added first. Over every date from 1900 to 2099, the four published methods give different numbers, pair by pair, on 0.0956 to 0.1608 of dates, but never disagree about the residue.

References

Dudley, Underwood. 1997. Numerology: Or What Pythagoras Wrought. Mathematical Association of America.
Hardy, G. H., and E. M. Wright. 2008. An Introduction to the Theory of Numbers. 6th ed. Oxford University Press.

Fan, Y. (2026). Modular Numerology, Character-Stroke Hashes and Residue-Class Distributions: Digital-Root Arithmetic, Kangxi Radical Restorations, Modulo-80 Grid Mappings and Empirical Base-Rate Concentration [姓名笔画、生命灵数与手机号码的同余映射和分布论] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090178 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).