10 challenges. Learn ring arithmetic, CRT decomposition, and the seven primes.
1
2
3
4
5
6
7
8
9
10
CHALLENGE 1 OF 10
The Identity
In .ax, s is the multiplicative identity: s = 1. Multiplying anything by s leaves it unchanged.
Type show s and press Run.
+ hint: Just type: show s
Press Run to execute your code.
CHALLENGE 2 OF 10
The First Prime
D = 2, the only even prime. Together with 1, it seeds the chain: c(1) = 3, c(2) = 5, c(3) = 7, c(5) = 11.
Compute show s + s.
+ hint: Addition in the ring: show s + s. Or just: show D
Press Run to execute your code.
CHALLENGE 3 OF 10
The Chain
The map c(n) = 2n+1 applied to each chain member generates the next: c(1) = K = 3, c(2) = E = 5, c(3) = b = 7, c(5) = L = 11. These are built-in constants in .ax.
Show all five primes.
+ hint: Use show for each: show D, show K, show E, show b, show L
Press Run to execute your code.
CHALLENGE 4 OF 10
The Primorial
Multiply the five primes together: D * K * E * b * L. This gives the ring Z/2,310, where each prime appears exactly once.
What number do you get?
+ hint: Just multiply: show D * K * E * b * L
Press Run to execute your code.
CHALLENGE 5 OF 10
Decomposition
The Chinese Remainder Theorem splits any number into 7 independent channels. The builtin crt(n) returns [n%8, n%9, n%25, n%49, n%11, n%13, n%17].
Try it: show crt(KEY). KEY = 41, which is self-inverse mod 210 (41*41 = 1 mod 210).
+ hint: Type: show crt(KEY)
Press Run to execute your code.
CHALLENGE 6 OF 10
The 6-Channel Ring
The ring Z/12,612,600 has 6 channels: mod 8, mod 9, mod 25, mod 49, mod 11, mod 13. The factorization is 2^3 * 3^2 * 5^2 * 7^2 * 11 * 13 = 12612600. GATE = 13, the 6th prime, completes it.
Compute show D^3 * K^2 * E^2 * b^2 * L * GATE.
+ hint: You get 12,612,600. Six prime-power channels: 8 * 9 * 25 * 49 * 11 * 13.
Press Run to execute your code.
CHALLENGE 7 OF 10
The Projector
OMEGA = 1,576,576 = 2^420 mod 12,612,600. Decompose it with crt: the mod-8 channel is 0, all other 6-channel ring channels are 1. An idempotent is an element where each channel squares to itself (0^2=0, 1^2=1). Multiplying by OMEGA zeros out the mod-8 channel and preserves the rest.
Verify: show crt(OMEGA).
+ hint: crt(OMEGA) = [0, 1, 1, 1, 1, 1, 13]. First six channels: 0^2=0, 1^2=1 (idempotent in Z/12,612,600). The seventh (mod 17) shows 13 -- not idempotent there.
Press Run to execute your code.
CHALLENGE 8 OF 10
Self-Inverse
KEY = 41 is self-inverse in Z/210: 41 * 41 mod 210 = 1. Squaring it returns to the identity.
Verify: compute KEY * KEY and KEY * KEY % 210. Then decompose with crt to see per-channel values.
+ hint: KEY * KEY = 1681. KEY * KEY % 210 = 1. The mod-8 channel shows 1 because 41 mod 8 = 1.
Press Run to execute your code.
CHALLENGE 9 OF 10
Error Correction
11 can detect errors in the four inner channels (mod 8, 9, 25, 49) because 210/p is coprime to 11 for every inner prime p in {2, 3, 5, 7}: none of 105, 70, 42, 30 are divisible by 11.
Verify all four: show 105 % L, 70 % L, 42 % L, 30 % L. None should be 0.