Arithmetic Progressions Explorer
▶ Theoretical Foundation
Visibility Indicator
For any lattice point $(a,b) \in \mathbb{Z}^2$, define the visibility indicator:
$$ \operatorname{vis}(a,b) = \begin{cases} 1, & \gcd(a,b)=1,\\[4pt] 0, & \text{otherwise}. \end{cases} $$
Primitive lattice points with $\gcd(a,b)=1$ determine rays from the origin that encounter no other lattice point before reaching $(a,b)$.
Primitive rays $(a,b)$ correspond naturally to reduced residues $r \bmod m$.
Modular Embedding
Each reduced residue class $r$ with $\gcd(r,m)=1$ embeds into the unit circle by:
$$ \phi_m : (\mathbb{Z}/m\mathbb{Z})^{\times} \longrightarrow S^1, \qquad \phi_m(r) = e^{2\pi i r/m}. $$
This mapping creates a natural connection between abstract algebraic objects (unit groups of residue rings) and geometric objects (points on the unit circle). The Farey Channel visualization exploits this correspondence by showing how all residue classes for moduli from $1$ to $m$ form concentric layers.
Norms and Gaussian Integers
A primitive vector $(a,b)$ with norm
$$ N = a^2 + b^2 $$
corresponds to the Gaussian integer $a + bi \in \mathbb{Z}[i]$, with
$$ |a+bi|^2 = a^2 + b^2 = N. $$
The GCD 3D Sphere visualization maps these relationships to spherical coordinates, where the radius encodes the GCD value and creates natural shells of coprime and non-coprime pairs.
Prime Norm Uniqueness
If
$$ a^2 + b^2 = p, \qquad p \equiv 1 \pmod{4}, $$
where $p$ is prime, then the Gaussian integer representation is unique up to signs and swapping coordinates:
$$ a + bi \sim \{\pm a \pm bi,\ \pm b \pm ai\}. $$
This is a consequence of unique factorization in $\mathbb{Z}[i]$. Primes $p \equiv 1 \pmod{4}$ split as $(a+bi)(a-bi)$ in the Gaussian integers, while primes $p \equiv 3 \pmod{4}$ remain inert.
Basel Problem Connection
The density of visible (coprime) lattice points in large squares is given by:
$$ \lim_{N\to\infty} \frac{ \#\{(a,b)\in[-N,N]^2 : \gcd(a,b)=1\} }{ (2N+1)^2 } = \frac{6}{\pi^2}, $$
the classical Basel constant. This remarkable result connects:
• Number theory (coprimality and GCD)
• Analysis (the Riemann zeta function $\zeta(2) = \pi^2/6$)
• Probability (the chance that two random integers are coprime)
• Geometry (visible lattice points from the origin)
The Coprime Density canvas tracks $\phi(n)/n$ for each modulus $n$, showing how individual values fluctuate around this limiting density of $6/\pi^2 \approx 0.6079$.
Euler's Totient Function
The Euler totient function $\phi(n)$ counts integers coprime to $n$:
$$ \phi(n) = n \prod_{p \mid n} \left(1 - \frac{1}{p}\right), $$
where the product runs over all prime divisors $p$ of $n$. Key properties:
• $\phi(p) = p-1$ for prime $p$ (field structure)
• $\phi(p^k) = p^{k-1}(p-1)$ for prime powers
• $\phi(mn) = \phi(m)\phi(n)$ when $\gcd(m,n)=1$ (multiplicative)
• $\sum_{d \mid n} \phi(d) = n$ (Gauss's theorem)
• $\phi(n)/n = \prod_{p \mid n}(1-1/p)$ approaches $6/\pi^2$ on average
Chinese Remainder Theorem
For coprime moduli $m_1, m_2, \ldots, m_k$, the ring isomorphism holds:
$$ \mathbb{Z}/(m_1 m_2 \cdots m_k)\mathbb{Z} \cong \mathbb{Z}/m_1\mathbb{Z} \times \mathbb{Z}/m_2\mathbb{Z} \times \cdots \times \mathbb{Z}/m_k\mathbb{Z}. $$
This fundamental result predicts the structure of $\mathbb{Z}/m\mathbb{Z}$:
• If $m = \prod p_i^{k_i}$ has $\omega(m)$ distinct prime factors, then
• The ring has exactly $2^{\omega(m)}$ idempotents
• The unit group $(\mathbb{Z}/m\mathbb{Z})^{\times}$ decomposes as $\prod (\mathbb{Z}/p_i^{k_i}\mathbb{Z})^{\times}$
• Zero divisors exist iff $m$ is composite
Geometric Interpretation
This tool visualizes multiple geometric interpretations simultaneously:
1. Multiplication Table: Cayley table of the ring $(\mathbb{Z}/m\mathbb{Z}, +, \times)$ showing
algebraic structure through color patterns
2. Unit Circle: Embedding $\phi_m : r \mapsto e^{2\pi i r/m}$ creates concentric Farey sequences,
connecting rational approximation to modular arithmetic
3. GCD Sphere: Spherical coordinates $(a,b) \mapsto (\theta, \phi, r)$ where radius $r \propto \gcd(a,b)$
creates natural shells separating coprime from non-coprime pairs
4. Density Plot: The function $n \mapsto \phi(n)/n$ oscillates around $6/\pi^2$, revealing
number-theoretic patterns in totient distribution
Unifying Philosophy
These visualizations reveal a deep unity: algebraic structure (rings, groups, fields), geometric patterns (circles, lattices, spheres), and analytic phenomena (density, limits, zeta functions) are different facets of the same mathematical reality. The Farey channels show how rational numbers organize themselves on the circle; the GCD sphere reveals the geometry of divisibility; the multiplication tables expose the combinatorial essence of modular arithmetic; and the density plots connect it all to the probabilistic interpretation via the Basel problem. Together, they form a complete picture of the modular world—one that is simultaneously algebraic, geometric, and analytic.
▼ 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.