When do the two faces end in 09 and 11, and which other endings are possible? From row 4 onward, every cell has exactly one of four two-digit pairs: 09/11, 29/31, 69/71 or 89/91. The pair follows an exact exponent cycle of length 1, 2 or 4. Row 5 always gives 09/11; that pattern does not persist across all later rows. The first three rows have separate cycles or initial exceptions.
This is a congruence theorem for all positive orders and exponents, on both faces, regardless of primality. In particular, a decimal ending is not a primality test.
Definitions and the last digit
Let be the -th prime, with , and , for . Write and . An ending is a residue modulo , padded on the left with zeros to places when needed. Pairs below list minus first, plus second.
Last-digit theorem. For every and , the endings are 9/1. The product contains both 2 and 5: at they come from and ; at both are already in . Thus . For , the last-digit pairs cycle as 1/3, 3/5, 7/9, 5/7; for they cycle as 5/7, 7/9, 3/5, 1/3, starting at . These follow by multiplying successively by 2 or by 3 modulo 10.
Complete two-digit classification from row 4
For , set and . The primorial is squarefree and includes 2 and 5 exactly once, so both and belong to . Cancellation of a factor of 10 gives
This proves the entire classification:
Residue r
Minus ending
Plus ending
1
09
11
3
29
31
7
69
71
9
89
91
The period is exactly the multiplicative order of modulo 10: it is 1 for , 2 for , and 4 for or . Indeed, equality after a shift is equivalent to . Since is a unit, this is equivalent to . There is no initial transient.
In particular 09/11 occurs exactly when . The following table solves that condition completely. A residue 0 modulo a period means its positive multiples, since throughout.
a
b = 1
b = 3
b = 7
b = 9
1
all n
n = 0 mod 4
n = 0 mod 4
n even
3
never
n = 3 mod 4
n = 1 mod 4
never
7
never
n = 1 mod 4
n = 3 mod 4
never
9
never
n = 2 mod 4
n = 2 mod 4
n odd
To check the table, list as 3, 9, 7, 1, and as 7, 9, 3, 1; the powers of 9 alternate 9, 1. Multiplication by each gives exactly the displayed solutions. Thus a row has 09/11 at every exponent if and only if . These conditions depend on the row's primorial and base; there is no threshold in beyond which every row has that ending. To prove the latter assertion, suppose there were only finitely many primes other than 2 and 5 whose residue modulo 10 is not 1, and let be their product. The integer is odd, not divisible by 5 or by any prime in , and is 9 modulo 10. Yet a product of primes all 1 modulo 10 would be 1 modulo 10, a contradiction. Such bases therefore occur arbitrarily late, and every one has an exponent period greater than 1.
Examples and the exceptional rows
Row
Center M
Two-digit behavior
1
2^n
Period 20 from n = 2; n = 1 is transient
2
2·3^n
Period 20 from n = 1
3
6·5^n
29/31 at n = 1; 49/51 for every n ≥ 2
4
30·7^n
09/11, 69/71, 89/91, 29/31; repeat
5
210·11^n
09/11 for every n ≥ 1
6
2310·13^n
29/31, 89/91, 69/71, 09/11; repeat
7
30030·17^n
09/11 exactly when n = 1 mod 4
8
510510·19^n
89/91 for odd n; 09/11 for even n
For example, row 4 begins and . Row 5 begins ; row 6 begins , disproving a universal 09/11 rule for all . The row 3 assertion follows from and for : and multiplication by 5 leaves 25 unchanged.
For row 1, once the center is 0 modulo 4; modulo 25 its powers of 2 have order 20. To verify that order, , and exclude every proper divisor of 20. The Chinese remainder theorem therefore gives exact period 20 modulo 100. The center has residue 2 modulo 4, so it never repeats later. For row 2, canceling the coefficient 2 reduces the period question to powers of 3 modulo 50. Their order is 20: , , and , while the modulo-2 condition is automatic. None of rows 1–3 ever has 09/11: rows 1 and 2 lack a factor 5 in , and row 3 has precisely the two cases just proved.
Any number of decimal places
Period theorem. Fix decimal places. If is coprime to 10, put and . Both faces have exact period from , taking the order modulo 1 to be 1.
Proof. Equality of the center's residues at and is equivalent to . Dividing by leaves a coefficient coprime to , so the condition is precisely . Adding or subtracting 1 preserves this equality and its least positive period. For , , so the exact period is . For , it is .
The two non-unit bases have a transient and must be treated separately:
Row
First exponent of the periodic tail
Exact tail period
k = 1, p = 2
n = d
ord modulo 5^d of 2
k = 3, p = 5
n = d
ord modulo 2^max(d−1,0) of 5
Proof for the exceptions. At , the residue modulo is zero exactly when . The independent modulo- component is a unit cycle of powers of 2. At , the residue modulo is zero exactly when . Equality in the modulo- component, after canceling the factor , is precisely . For the modulus is 1 and the condition is automatic. The Chinese remainder theorem combines each stable zero component with its unit cycle to give the stated exact period. No periodic tail can start earlier: for , the valuation at the base prime is , and no later exponent has the same residue modulo that prime's -th power. Subtracting or adding 1 again preserves equality. This proves both the start and the minimal period.
For example, row 3 has three-digit endings 029/031 at , 149/151 at , and 749/751 for every . The eventual fixed ending is a consequence of the theorem, not a guess from a short sample.
Verification, scope and related reading
The proof applies to every cell, including composites and the value , which is neither prime nor composite. It supplies no prime counts or asymptotic prime-frequency claim. The patterns follow from the specified primorial construction and elementary congruences; no novelty claim is made for the multiplicative-order or Chinese-remainder principles.
This standalone Python example checks the displayed small rows by ordinary integer arithmetic, with no period-finding algorithm:
h = 1
for k, p in enumerate((2, 3, 5, 7, 11, 13, 17, 19), 1):
pairs = [f"{(h*p**n-1)%100:02d}/{(h*p**n+1)%100:02d}"
for n in range(1, 9)]
print(k, pairs)
h *= p
The repository's tools/test_trailing_digits.py additionally checks the classification and minimal periods against direct integer values on bounded grids. These computations check the statements' implementation; the proof above establishes the unbounded claims.
The paper's structural section explains the grid's sieve and factored neighbors. Exponent sieves addresses a different modular question: how divisors exclude exponent classes, and why their survival fractions need not multiply. To compute a complete integer, use Explore the Grid.