Arithmetic Progressions Explorer

Multi-Canvas Visualization Suite · Ring Theory · Number Theory
Wessen Getachew · @7dview
Finite Fields Farey Sequences Prime Explorer Goldbach Conjecture

Theoretical Foundation

Introduction & Guide

What is This Tool?

This interactive visualization suite provides comprehensive exploration of modular arithmetic through four synchronized canvases, each revealing different structural properties of the ring ℤ/mℤ = {0, 1, 2, ..., m-1} with addition and multiplication mod m.

Independent Canvas Mode: Each canvas can operate independently from the global controls. Enable "Independent Mode" for any canvas to set its own modulus value, allowing simultaneous exploration of different moduli across canvases. For example, compare multiplication tables at m=12 and m=17, or analyze GCD structures at different scales. The density canvas also supports custom range selection (e.g., explore n=1 to n=1000 independently of other canvases).

Canvas 1: Multiplication Table - Complete operation tables with multiple coloring schemes (Rainbow, Divisibility, Zero Divisors, Idempotents). Features live statistics dashboard showing modulus properties, unit count, density, and quick properties. Includes element inspector for detailed analysis of individual elements. Additional tools: symmetry highlighting, diagonal emphasis, alternate shading, cell opacity control, bold labels, and table transpose.

Canvas 2: Unit Circle - Farey Channels - Geometric representation with concentric rings for all moduli from 1 to m. Features global phase rotation (r/m with 17-decimal precision), per-ring rotation control, dyadic power connections for cardioid patterns, and multiple connection modes. Live statistics track rotation angles and residue layer counts. Point labeling options: none, r, r/m, 2πr/m, -2πr/m. Additional tools: angle markers, fade non-coprime, animation control.

Canvas 3: GCD Structure - 3D Sphere - Interactive 3D visualization with full 360-degree rotation on both axes, zoom control (50%-200%), auto-rotate mode, optional grid display, and mouse drag support. Maps GCD relationships to spherical coordinates with depth-sorted rendering. Live statistics show current rotation angles and zoom level. Point labeling options: none, (a,b) pairs, gcd(a,b) values. Additional filters: coprime-only mode, color by GCD, point size scaling, axis snap views.

Canvas 4: Coprime Density - Plot of φ(n)/n for all n from 2 to m, with Basel problem reference line (6/π² ≈ 0.6079). Adjustable point size, optional grid/labels, point connection mode, and prime highlighting. Live statistics display density trends and Basel ratio comparisons. Point labeling options: none, n values, density values, primes only. Unique feature: "Connect Same Densities" draws dashed lines connecting all points with matching coprime densities (like 1/2, 1/3, etc.) and labels the reduced fractions on the y-axis, revealing the rational structure of totient distributions. Additional tools: trendline, log scale x-axis, y-axis range control, zoom to primes, fit to data.

Global Features: All canvases include mouse hover tooltips for detailed information, live updating statistics panels, synchronized controls, and keyboard shortcuts (press H for help). Animation player supports automated progression through moduli (1-1000 range with adjustable speed). Export system provides 2K/4K/8K resolution options with comprehensive legends, statistical analysis panels, and individual/combined canvas exports. Mathematical presets include Basel Problem (m=6), Highly Composite (m=60), Prime Fields (m=17), Fibonacci/Mersenne primes, Perfect Numbers, and more.

Canvas 1: Multiplication Table

What it shows: Complete operation tables visualizing algebraic structure of ℤ/mℤ. Each cell (i,j) displays the result of the selected operation between row i and column j, reduced modulo m.

8 Table Types:
Multiplication: Full ring multiplication a × b (mod m) - reveals multiplicative structure and patterns
Addition: Addition table a + b (mod m) - always forms a cyclic group, shows additive structure
Cayley (Units): Restricted to φ(m) invertible elements - displays the unit group (ℤ/mℤ)×
Power Table: Shows a^b (mod m) - exponential relationships between elements
Element Orders: Displays multiplicative order of each element - smallest k where a^k ≡ 1 (mod m)
GCD Matrix: Shows gcd(a,b) for all pairs - visualizes divisibility structure
LCM Matrix: Displays lcm(a,b) - least common multiples reveal factor relationships
Inverse Map: Shows multiplicative inverse for each element (— for non-units)

11 Color Schemes:
Rainbow: Color by result value using hue spectrum (0=red, m=violet)
Divisibility: Intensity based on divisor count - more divisors = different hue
Zero Divisors: Red highlights non-zero elements where ab ≡ 0 (mod m), blue for non-ZD
Idempotents: Gold for elements where a² ≡ a (mod m), gray otherwise
Primality: Green for prime results, colored by smallest prime factor for composites
Modular Distance: Colors by distance from 0 in modular arithmetic (min(a, m-a))
Quadratic Residues: Gold for perfect squares mod m, purple for non-residues
Nilpotents: Colors by nilpotency degree (k where a^k ≡ 0), darker for higher degrees
Symmetry Pattern: Gold diagonal, colors by |a-b| to reveal table symmetry
Heatmap: Classic gradient from dark blue → cyan → yellow → red (0 to m)
Discrete Values: 20 distinct colors cycling through results for maximum contrast

Label Options: Choose between White (default), Black, or Auto (Contrast) labels. Auto mode intelligently selects text color based on background brightness for optimal readability.

Advanced Display Options: Highlight Symmetry emphasizes symmetric entries, Highlight Diagonal marks the main diagonal (a×a or a+a), Alternate Shading creates checkerboard pattern, Bold Labels increases font weight, Cell Opacity adjusts transparency, Transpose Table swaps rows/columns.

Live Statistics Dashboard: Real-time display of modulus properties including φ(m) count, density ratio, units list, zero divisor count, idempotent set, prime test with factorization, previous/next primes, Carmichael lambda, and group order. Updates instantly as modulus changes.

Element Inspector: Click any table cell or enter element number to analyze individual elements. Shows order (for units), inverse calculation, power sequences, generated subgroup, idempotent status, and nilpotent properties. Includes "Highlight in Table" and "Show Subgroup" buttons for visual exploration.

Key insight: Different table types and color schemes reveal distinct algebraic properties. Multiplication tables show zero divisors and unit structure; addition tables are always symmetric and cyclic; Cayley tables reveal group structure; power tables expose primitive roots; order tables identify cyclic subgroups. Color schemes highlight specific mathematical properties for deeper analysis. Hover over cells for instant details.

Canvas 2: Unit Circle - Farey Channels

What it shows: Comprehensive visualization of all residues r/m for every modulus from 1 to m, mapped to concentric rings inside the unit circle. Each ring represents a different modulus, with points at angles ±2πr/m showing both positive and negative rotations. Total of m(m+1)/2 residues displayed.

Global Phase Rotation (r/m): Control global rotation with fraction r/m, displayed to 17 decimal places for maximum precision. For example, r=1, m=2 gives 180° rotation; r=1, m=8 gives 45°. This reveals rotational symmetries in the modular structure. Quick preset buttons available for common fractions (1/2, 1/3, 1/4, 2/3, 1/6, 3/4, 1/8).

Per-Ring Rotation Increment: Additional rotation control (0-360°) that applies progressively to each ring. Ring index × increment creates spiral patterns. Can be applied to global phase via checkbox to affect all canvases.

Residue Layers: Concentric rings from center (m=1, specially marked and larger) to outer edge (m=your_limit). Ring radius = m/M × maxRadius. Points colored by gcd(r,m): Gold for coprime (gcd=1, units), Cyan for prime GCD (when enabled), gradient for composite GCD values. Ring labels show modulus values at intervals.

Connection Modes:
• Show Residue Layers: Toggle visibility of all concentric rings
• Connect r in Each m: Forms polygons on each ring connecting points with same residue
• Connect r to Next mod r: Radial lines showing how residues project through modular hierarchy
• Dyadic Powers r×2ⁿ: Creates cardioid patterns by connecting r, 2r, 4r, 8r, 16r... (coprime points only)
• Arc Connections: Use smooth curved Bézier arcs instead of straight lines for elegant visualization
• Highlight Prime GCD: Cyan coloring for points where gcd(r,m) is prime

Distance Measurement Tool: Three modes for measuring distances between Farey fractions:
Click Two Points: Select any two fractions to measure all distance metrics
Hover Distance: Select one point, hover over others for real-time distance display
Metrics Calculated: Euclidean distance (pixels), Angular distance (degrees), Farey distance (determinant |r₁m₂ - r₂m₁|), Ring separation (number of rings), Mediant fraction ((a+c)/(b+d) automatically reduced)
• Visual feedback with pink highlighted points, gold outlines, and dashed connection lines

Farey Sequence Statistics: Real-time analysis of Farey sequences across all layers:
• Total fractions: m(m+1)/2 formula
• Coprime pairs count (sum of φ(k) for k=1 to m)
• Gap analysis: average, minimum, and maximum gaps between consecutive Farey fractions
• Neighbor property verification: adjacent fractions satisfy |bc - ad| = 1
• Distribution analysis on unit circle

GCD Filter Options: Choose which points to display:
• Show All (default)
• GCD = 1 Only (coprime points)
• GCD > 1 Only (non-coprime points)

Point Labeling: Six label modes - None, GCD Values (default), r, r/m fractions, 2πr/m angles, -2πr/m angles. Labels replace points and inherit their colors. Adjustable label size (6-20px).

Line Thickness Control: Adjustable slider (0.5-5px) for connection line width to optimize visibility.

Live Statistics: Real-time display of current phase rotation angle (17 decimals), per-ring increment, total residue count, and layer information. Updates instantly with any parameter change.

Key insight: Visualizes the complete modular lattice structure, showing how residue classes relate across different moduli. Dyadic connections reveal multiplication by 2 patterns (like times table cardioids). Phase rotation exposes hidden symmetries. The center represents gcd=1 (coprimality), with φ(m) gold points on each ring. Distance measurement enables precise Farey analysis. Arc connections provide elegant curved visualizations. Hover over points for detailed fraction, angle, and GCD information.

Canvas 3: GCD Structure - 3D Sphere

What it shows: Interactive 3D sphere visualization mapping pairs (a,b) to spherical coordinates based on their GCD value. Points are positioned using spherical coordinates (θ, φ) where θ = 2πa/m (azimuthal) and φ = πb/m (polar), with radius proportional to gcd(a,b). Creates shells where coprime pairs cluster near surface.

Full 360-Degree Rotation Control: Two independent sliders control X-axis and Y-axis rotation (0-360°) with real-time updates. Explore from any angle to reveal hidden structures. Mouse drag support for intuitive rotation (click and drag to rotate, cursor changes to grabbing hand). Values displayed in degrees with instant visual feedback.

Zoom Control: Adjust view distance from 50% to 200% for detailed inspection or overview perspective. Maintains proper depth sorting and point scaling throughout zoom range.

Interactive Features:
• Rotation X/Y: Full 360° control on both axes - explore from any angle, mouse drag enabled
• Zoom: Perspective adjustment from 50% to 200% of base size
• Show Connections: Draw lines between related GCD pairs for structural analysis
• Show Grid: Display latitude/longitude grid with X/Y/Z axes for spatial reference
• Auto-Rotate: Continuous animation mode for presentations (rotates on Y-axis)
• Reset View: Instantly return to default orientation (45°, 45°, 100%)

3D Mapping Mathematics: Each pair (a,b) with gcd value g maps to 3D coordinates: x = r·sin(φ)·cos(θ), y = r·sin(φ)·sin(θ), z = r·cos(φ), where r = (g/max_gcd)·radius. Perspective projection with focalLength/(focalLength + z) scaling. Depth sorting ensures proper occlusion. Point size and opacity scale with depth for realistic 3D effect (back points smaller/dimmer).

Color Coding: Hue mapped to GCD value - coprime pairs (gcd=1) in gold at surface, higher GCD values in spectrum from blue to red. Brightness increases for closer points (depth-based lighting).

Live Statistics: Real-time display of current X-rotation angle, Y-rotation angle, and zoom percentage. Updates continuously during rotation and zoom operations. Shows whether auto-rotate is active.

Key insight: The 3D sphere reveals spatial clustering of GCD relationships that aren't visible in 2D. Coprime pairs (gcd=1, gold) cluster near the surface forming a dense shell. Higher GCD values create concentric inner shells. Rotation exposes hidden symmetries in the divisibility structure. The spherical topology naturally represents the periodic nature of modular arithmetic. Hover over points for pair information and GCD details.

Canvas 4: Coprime Density Analysis

What it shows: Complete plot of φ(n)/n for all n from 2 to m, where φ(n) is Euler's totient function (count of numbers coprime to n). Visualizes how the density of coprime numbers varies across different moduli and converges toward the Basel problem limit.

Basel Problem Reference Line: Purple dashed line at 6/π² ≈ 0.6079, representing the limiting probability that two random integers are coprime. This fundamental constant connects number theory to the Riemann zeta function: ζ(2) = π²/6, so 1/ζ(2) = 6/π². The plot shows how individual moduli deviate from this asymptotic average.

Visualization Controls:
• Point Size: Adjustable slider (1-10px) for optimal visibility across different data ranges
• Show 6/π² Line: Toggle Basel problem reference line on/off
• Show Grid: Display background grid for easier value reading
• Show Labels: Toggle axis labels and value annotations
• Connect Points: Optional line connections between consecutive points to show trend

Data Representation: Each point represents one modulus n (from 2 to m), plotted at coordinates (n, φ(n)/n). Prime numbers appear highest (φ(p)/p = (p-1)/p → 1 as p increases). Highly composite numbers with many small prime factors show lowest densities. The m=1 case is omitted as φ(1)/1 = 1 is trivial.

Color Coding: The current modulus m appears in gold (larger point), m=1 in green (if shown), and all other points in cyan. This highlights the current focus while maintaining context of the full range.

Live Statistics: Real-time display of total data points plotted, current modulus density value, ratio compared to Basel limit, trend analysis (above/below average), and distance to nearest prime densities. Updates instantly as modulus changes.

Key insight: Shows how coprime density varies with m and converges toward 6/π² on average. Prime moduli have densities approaching 1 (all non-zero elements coprime). Composite moduli with many small prime divisors have lower densities. The overall trend illustrates a fundamental probabilistic property of integers: asymptotically, about 60.79% of integer pairs are coprime. Hover over points for exact φ(n), density, and Basel ratio.

Mathematical Concepts

φ(m) - Euler's Totient: Count of units (invertible elements). For prime p, φ(p) = p-1. For prime powers, φ(p^k) = p^k - p^(k-1).

Zero Divisors: Non-zero elements a where ab ≡ 0 (mod m) for some non-zero b. Present when m is composite. Element a is a zero divisor iff gcd(a,m) > 1.

Idempotents: Elements satisfying a² ≡ a (mod m). Always includes 0 and 1. By Chinese Remainder Theorem, m = p₁^k₁ × ... × pᵣ^kᵣ has 2^r idempotents.

Using the Tool

1. Choose a modulus: Use slider (2-200) or type directly (up to 1000). Try the preset buttons for mathematically significant values: Basel Problem (m=6), φ(12)=4, Prime Field (m=17), Highly Composite (m=60), Power of 2 (m=32), Fibonacci Prime (m=89), Mersenne Prime (m=31), Perfect Number (m=28), Golden Ratio (m≈161), and Ramanujan τ (m=24).

2. Select table type (Canvas 1):
• Multiplication: Full ring multiplication a × b (mod m) - reveals multiplicative structure
• Cayley (Units Only): Restricted to invertible elements - shows unit group structure
• Addition: Addition table a + b (mod m) - always forms a cyclic group
Choose color schemes: Rainbow (by value), Divisibility (by divisor count), Zero Divisors (highlights non-invertible), Idempotents (a² ≡ a).

3. Explore Farey Channels (Canvas 2):
Phase Rotation: Enter r/m fraction to rotate entire structure (17-decimal precision display). Quick presets: 1/2 (180°), 1/3 (120°), 1/4 (90°), 1/6 (60°), 1/8 (45°).
Per-Ring Rotation: Apply progressive rotation to each ring (0-360°). Creates spiral patterns. Can sync to global phase.
Connection Modes: Toggle different connection patterns - polygons on each ring, radial projections through modular hierarchy, dyadic powers for cardioid patterns.
Point Labels: Choose labeling mode - none, r (residue), r/m (fraction), 2πr/m (positive angle), -2πr/m (negative angle).
Residue Layers: See all moduli from 1 to m simultaneously as concentric rings. Gold = coprime (gcd=1), Cyan = prime GCD, gradient = composite GCD.

4. Navigate 3D GCD Sphere (Canvas 3):
Mouse Control: Click and drag to rotate sphere in real-time. Full 360° freedom on both axes.
Rotation Sliders: Fine control with X-axis (0-360°) and Y-axis (0-360°) sliders. View from any angle.
Quick Views: Snap buttons for X-axis, Y-axis, Z-axis orthogonal views. Reset button returns to default (45°, 45°).
Zoom: Adjust perspective from 50% to 200% for close-up or overview.
Filters: Coprime-only mode shows just gcd=1 pairs. Color by GCD maps hue to divisibility.
Point Labels: Choose (a,b) pairs or gcd(a,b) values. Auto-hides when cluttered.
Auto-Rotate: Continuous animation for presentations.

5. Analyze Coprime Density (Canvas 4):
Basel Line: Purple dashed reference at 6/π² ≈ 0.6079 shows asymptotic coprime probability.
Connect Same Densities: Automatic detection and connection of points with matching φ(n)/n values. Draws colored dashed lines and labels reduced fractions (1/2, 1/3, 2/3, etc.) on y-axis. Reveals that all even numbers ≥ 2 have density ≥ 1/2, powers of 2 follow specific patterns, etc.
Point Labels: Choose n values, density values, or primes only. Helps identify specific points.
Y-Axis Control: Manually set min/max range or use "Zoom to Primes" / "Fit to Data" for automatic optimization.
Log Scale X: Switch to logarithmic x-axis for better visualization of large ranges.
Trendline: Linear regression shows overall convergence trend toward Basel limit.

6. Use Element Inspector (Canvas 1):
• Click any cell in multiplication table or type element number directly.
• View: order, unit status, inverse (if exists), power sequence, generated subgroup.
• For non-units: shows zero divisor status, idempotent property, nilpotent detection.
• Buttons: "Highlight in Table" emphasizes element in grid, "Show Subgroup" displays generated subgroup.

7. Animation Player:
• Set start/end modulus range (e.g., 1→30, 1→100, 1→1000).
• Adjust speed: 50ms to 2000ms per step (default 200ms).
• Quick range buttons: 1→30, 1→60, 1→100, 1→1000.
• Controls: Play ▶, Pause ⏸, Stop ⏹. Progress tracker shows current position.
• All four canvases update simultaneously during animation.

8. Keyboard Shortcuts: Press H to show full list.
• Arrow keys: ←/→ change modulus ±1, ↑/↓ change modulus ±10
• Space: Play/Pause animation
• R: Reset all views to defaults
• E: Export all canvases
• Esc: Hide keyboard help

9. Export Options:
• Resolution: Choose 2K (2048px), 4K (3840px), or 8K (7680px) before exporting.
• Individual Canvas: PNG with title, subtitle, metrics, and comprehensive legend panel.
• All 4 Canvases: 2×2 grid layout with titles and key metrics on each panel.
• Full Analysis Export: All 4 canvases + extensive statistical analysis panel showing modulus properties, unit group details, zero divisor structure, idempotent analysis, GCD distribution, Basel comparisons, ring classification, and canvas-specific metrics.
• CSV Data: Export multiplication table data, circle canvas residue data (all layers with GCD), GCD pair data, density analysis data, or combined "all data" CSV with everything.

Interesting Examples

m = 6 (Basel Problem): φ(6) = 2. Only 1 and 5 are units (coprime to 6 = 2×3). Related to ζ(2) = π²/6 and the fundamental coprime probability 6/π² ≈ 0.6079. Try phase r=1, m=6 for 60° rotation showing perfect 6-fold symmetry. Density plot shows how 6/π² emerges as the average. Zero divisors: {2, 3, 4} due to factorization. Idempotents: {0, 1, 3, 4} (2² = 4 total, as predicted by Chinese Remainder Theorem for 2×3).

m = 12: φ(12) = 4. Units are {1, 5, 7, 11}. Rich structure with 12 = 2²×3. Idempotents: {0, 1, 4, 9} - four idempotents from two prime factors (2² = 4). Enable "Connect r in Each m" to see beautiful dodecagonal (12-gon) patterns in Farey channels. Phase r=1, m=2 (180°) reveals binary palindrome structure in multiplication table. Density: 4/12 = 1/3 ≈ 0.333, which is 54.8% of Basel limit. Many zero divisors due to composite structure. Element Inspector: Try inspecting 5 (order 2: 5² ≡ 1), or 4 (idempotent: 4² ≡ 4).

m = 17 (Prime Field): φ(17) = 16. All non-zero elements {1,2,...,16} are units. Forms a field - no zero divisors, no nilpotents. Only trivial idempotents {0, 1}. Farey channels show perfect symmetry with 16 coprime points (all gold) on outer ring. Density: 16/17 ≈ 0.941, which is 154.8% of Basel limit - primes maximize coprime density. Multiplication table in "Rainbow" mode shows complete cyclic structure. 3D GCD sphere: All pairs are coprime, clustering on outer shell surface. Primitive roots exist: 3 is a generator with order 16 (inspect element 3 to see full power sequence).

m = 60 (Highly Composite): φ(60) = 16. Factorization: 60 = 2²×3×5 (three distinct primes). Rich divisibility structure with many zero divisors. Idempotents: 2³ = 8 total (from three prime factors). Enable "Dyadic Powers r×2ⁿ" in Farey channels to see stunning cardioid patterns emerging from doubling. These patterns are identical to times-table circle art - connecting 1→2→4→8→16→32→4... (mod 60). Density: 16/60 ≈ 0.267 (43.9% of Basel limit). "Connect Same Densities" reveals many points at 1/2, 1/3, 2/5, etc. Perfect for exploring: 60 divides evenly into many parts (excellent for angles, time).

m = 100 (Dyadic Cardioid Demo): Set m=100, enable "Dyadic Powers r×2ⁿ" in Canvas 2. Watch how multiplication by powers of 2 creates beautiful cardioid/nephroid curves. Each starting point r traces its own curve: r → 2r → 4r → 8r → 16r → ... (mod 100). Only coprime points participate (gcd(r,100)=1), creating gaps in the pattern. This connects modular arithmetic to classic mathematical art visualizations. φ(100) = 40 (since 100 = 2²×5²), so 40 golden points on outer ring generate 40 cardioid traces.

Phase Rotation Exploration:
• m=8 with phase r=1, m=8 (45°): Perfect octagonal symmetry, 8-fold rotational invariance.
• m=12 with phase r=1, m=3 (120°): Triangular symmetry, reveals 3-fold structure in 12.
• m=12 with phase r=1, m=4 (90°): Square symmetry, emphasizes factors of 4.
• m=360 with phase r=1, m=360 (1°): Explore circle with degree precision.
The 17-decimal angle display shows exact rotation for reproducing visualizations.

Density Fraction Lines (Canvas 4): Enable "Connect Same Densities" and observe:
• All even numbers n ≥ 2: horizontal line at density = 1/2 (exactly half are coprime).
• Powers of 2 (4, 8, 16, 32, ...): line at density = 1/2 (from 2^(k-1) coprime to 2^k).
• Multiples of 3 only (9, 27, 81): line at density = 2/3.
• Numbers of form 2×3^k: line at density = 1/3.
Patterns reveal: φ(n)/n = product over primes p|n of (1 - 1/p).
Try m=60 or m=100 to see multiple fraction lines clearly labeled.

Element Inspector Deep Dives:
• m=15, inspect element 6: Zero divisor (6×10 ≡ 0), not idempotent, not nilpotent.
• m=8, inspect element 2: Nilpotent! 2³ = 8 ≡ 0 (mod 8). Generates {2, 4, 0}.
• m=21, inspect element 4: Idempotent (4² ≡ 16 ≡ 4 mod 21). Not a unit.
• m=13, inspect element 2: Primitive root - generates all non-zero elements. Order = 12 = φ(13).
Click cells in multiplication table to instantly inspect products.

3D GCD Sphere Rotations:
• Default view (45°, 45°): Balanced perspective showing shell structure.
• Top view (0°, 0°): Looking down Z-axis, see azimuthal distribution.
• Side view (90°, 0°): Looking from Y-axis, see polar angle distribution.
• Enable "Coprime Only" filter to see just the outer shell of gcd=1 pairs.
• Enable "Show Grid" for spatial reference with lat/lon lines and XYZ axes.
• Try m=30 or m=60 for rich 3D structure with multiple GCD shells.

Multiplication Table
Ring ℤ/mℤ · Color-coded Structure
Ready
Canvas Controls & Settings
100%

Live Statistics Dashboard

Modulus
12
φ(m) Units
4
Density
0.333
Quick Properties:
• Units: {1, 5, 7, 11}
• Zero Divisors: 7 elements
• Idempotents: {0, 1, 4, 9}
• Prime Test: Composite (2² × 3)
Related Numbers:
• Previous Prime: 11 | Next Prime: 13
• Carmichael λ(12): 2
• Group Order: 4

Element Inspector

Properties of 5 (mod 12):
Order: 2 (5² ≡ 1)
Unit: ✓ Yes (gcd(5,12)=1)
Inverse: 5⁻¹ ≡ 5
Powers: 5¹=5, 5²=1
Generates: {1, 5}
Unit Circle - Farey Channels
Modular Residue Channels · Phase Rotation · Dyadic Lifting
Reverse ring order: outer ring becomes m=1, inner ring becomes m=n
Project all points onto the outer circle at their θ angle positions
Canvas Controls & Settings

Live Statistics - Farey Channels

Total Residues
78
Phase Angle
0.00000°
Ring Increment
Rotation Settings:
• Phase: 0/1 (0.00000000000000000°)
• Per-Ring: 0° increment
• Layers: 1 to 12 (visible)
• Connection Mode: None active
Layer Distribution:
• Coprime Points: 28 (gold)
• Prime GCD Points: 0 (cyan)
• Composite GCD: 50
• Sum Formula: m(m+1)/2
/
0.00000000000000000°
Each ring rotates by index × increment
1.5px
0
Gap=0: No lines · Gap=2: Twin primes · Gap=4: Cousin primes · Gap=6: Sexy primes
Draws all gap connections from 0 to selected value (r→r+0, r→r+1, ..., r→r+gap)
2
b=2: Dyadic (binary) · b=3: Triadic · b=5: Pentadic · b=7: Heptadic
10px
4px

Distance Measurement Tool

Selected Points:
Point 1: Not selected
Point 2: Not selected
Distance Metrics:
Euclidean:
Angular:
Farey Distance:
Ring Separation:
Mediant:

Farey Sequence Statistics

Farey Order
F₁₂
Total Fractions
78
Coprime Pairs
28
Farey Properties:
• Sequence Length: 1 + Σφ(k) for k=1 to m
• Neighbors: Adjacent fractions a/b and c/d satisfy |bc - ad| = 1
• Mediant: For a/b, c/d: mediant = (a+c)/(b+d)
• Ford Circles: Tangent circles at each fraction
Density Analysis:
• Average Gap:
• Min Gap:
• Max Gap:
• Distribution: Uniform on circle
GCD Structure - 3D Sphere
Interactive 360° View · Coprimality Network
Canvas Controls & Settings

Live Statistics - 3D Sphere View

X-Rotation
45°
Y-Rotation
45°
Zoom Level
100%
View Settings:
• Rotation: 45° × 45°
• Perspective: 100% base
• Auto-Rotate: Inactive
• Mouse Drag: Enabled
GCD Statistics:
• Total Pairs: 66
• Coprime Pairs: 28 (42.4%)
• Max GCD: 6
• Depth Sorting: Active
45°
45°
100%
2x

Distance Measurement Tool

Selected Pairs:
Point 1: Not selected
Point 2: Not selected
Distance Metrics:
3D Euclidean:
2D Screen:
GCD Difference:
Coprimality:
LCM:

GCD Pair Statistics

Total Pairs
66
Coprime (GCD=1)
28
Max GCD
6
GCD Distribution:
• GCD=1: 28 pairs (42.4%)
• GCD=2: 15 pairs (22.7%)
• GCD=3: 10 pairs (15.2%)
• GCD>3: 13 pairs (19.7%)
Sphere Properties:
• Shell Structure: GCD values map to radii
• Coprime pairs form outer shell
• Higher GCD = closer to center
• Spherical coords: θ = 2πa/m, φ = πb/m
Coprime Density
φ(m)/m Analysis
Canvas Controls & Settings

Live Statistics - Density Analysis

Data Points
11
Current Density
0.333333
Basel Ratio
0.5483
Basel Problem:
• Limit: 6/π² ≈ 0.607927
• Current: 0.333333 (54.8% of limit)
• Status: Below average
• ζ(2) = π²/6 connection
Trend Analysis:
• Range: n=2 to n=12
• Average: 0.512346
• Primes in range: 4
• Convergence: Approaching limit
3px
Configuration & Parameters
Mathematical Presets
Modulus Parameter
Modulus (m) 12
Animation Player
Ready to play
Global Phase Rotation
/
0.00000000000000000°
Global Display Options
Number Theory Calculator
Enter a number and click Calculate to see its properties
Modulus Comparison
Click Compare to see detailed comparison
Complete Ring Analysis & Properties
MODULUS
12
2² × 3
UNITS φ(m)
4
{1,5,7,11}
DENSITY
0.33
φ(m)/m ratio
RING TYPE
NO
Field Status
ZERO DIVISORS
7
Non-invertible elements
IDEMPOTENTS
4
{0,1,4,9}
NILPOTENTS
0
Elements with aⁿ ≡ 0
QUADRATIC RESIDUES
0
Perfect squares mod m
PRIMITIVE ROOTS
Generators of (ℤ/mℤ)×
CARMICHAEL λ(m)
Exponent of (ℤ/mℤ)×
GCD CLASSES
0
Distinct GCD values
EULER'S THEOREM
a^φ(m) ≡ 1 (mod m)

Export Options

Export Resolution