Modular Rings & Farey Hierarchy

Visualizing reduction paths: Primes (Fermat's Little Theorem) have only gcd=1 | Composites reduce through Farey channels
Modulus Selection
View Mode
Visual Controls
Display Filters
Point Labels
Color Scheme
Export & Actions
Export Configuration

Configuration

Modulus M = 12
2² × 3
Divisors: 1, 2, 3, 4, 6, 12

Statistics

Rings Shown
6
Total Points
28
φ(M)
4
Farey Channels
5

Understanding the Visualization

View Modes:
• 2D Circular: Traditional flat view
• 3D Chandelier: Stacked rings (M at top, M'=1 at bottom)

Circle Convention:
• r=0 is at 3 o'clock (θ=0)
• Points at angle θ = 2πr/M
• Counter-clockwise from right

3D Chandelier Mode:
• Drag to rotate view
• Scroll to zoom in/out
• Red chains: r=0 → center bottom
• Gold chains: Farey reductions
• Rings descend from M (top) to M'=1 (bottom)

Ring Differential Rotation:
• 0°: All rings aligned
• Small (10-45°): Gentle spiral
• Medium (90°): Helical twist
• 360°: Each ring rotated one full turn more
• Reveals hidden symmetries & patterns

For Prime M (Fermat's Little Theorem):
• Only 2 rings: M (outer) and 1 (center)
• All r∈{1,2,...,p-1} have gcd=1 (cyan)
• Only r=0 is reducible: 0/p → 0/1
• Single Farey line from r=0 to center
• Demonstrates: a^(p-1) ≡ 1 (mod p)

For Composite M (Farey Channels):
• Multiple rings for each divisor
• Each reducible r/M connects to r'/M'
• Shows complete reduction cascade

Example M=12, r=8:
8/12 → 2/3 (gcd=4, M'=3)
Line connects position 8 on M=12 to position 2 on M'=3.

Ring Structure

Click Update to see ring details...

Color Key

Gold = Farey connection lines
Cyan = Coprime points
Red = Reducible points

Click Interaction

Click any point to see its complete reduction path through all Farey channels...