Visualizing Euler Totient Function for 1 to 12
Visualising Euler's Totient Function
Overview
A brief animation that introduces the lesserβknown arithmetic functionβ―, shows how it counts integers coprime toβ―, and visualises the values for the first twelve positive integers. The key takeaway is how behaves irregularly yet reveals hidden structure in the integers.
Phases
| # | Phase Name | Duration | Description |
|---|---|---|---|
| 1 | Intro | ~3s | Title fades in, then a simple number line appears with markers 1β12. |
| 2 | Definition | ~4s | A brief visual of the formula \phi(n)=n\prod_{p\mid n}\left(1-\frac{1}{p}\r\right) appears beside the number line; the formula fades out as the next step begins. |
| 3 | Coprime Highlight | ~6s | For each from 1 to 12, the animation highlights in green the integers () that are coprime to . The count of green dots is displayed as a small bar above the corresponding . |
| 4 | Pattern Reveal | ~4s | Bars for all are collected into a barβchart style histogram on the right side, showing the sequence . A quick sweep emphasizes the irregular jumps. |
| 5 | Outro | ~3s | The title reβappears with the statement β measures hidden coprime structureβ. All elements fade out. |
Layout
βββββββββββββββββββββββββββββββββββββββββ
β TOP AREA β
βββββββββββββββββββββββββ¬ββββββββββββββββ€
β LEFT AREA β RIGHT AREA β
β (Number line + β (Histogram of β
β coprime highlights) β \phi values)β
βββββββββββββββββββββββββ΄ββββββββββββββββ€
β BOTTOM AREA β
β Small formula / caption (optional) β
βββββββββββββββββββββββββββββββββββββββββ
Area Descriptions
| Area | Content | Notes |
|---|---|---|
| Top | Title "Euler's Totient Function" | Fades in at start of Intro, fades out at Outro |
| Left | Number line 1β12 with dynamic green highlights for coprime integers | Primary visual; each is highlighted sequentially |
| Right | Bar chart of values for | Appears in Phaseβ―4, stays until Outro |
| Bottom | Optional formula displayed during Definition phase | Small font, fades with the formula |
Notes
- Total runtime β 20β―seconds, well under the 30βsecond guideline.
- All visual elements are generated with a single Manim
Sceneclass. - No explanatory text is used beyond the brief formula; the visual highlighting conveys the concept.
- Colors: green for coprime numbers, muted gray for nonβcoprime, blue for histogram bars.
- Transitions are simple fades and linear motions to keep the animation concise.
Created By
Description
The animation introduces the Euler totient function, shows a number line from 1 to 12, and highlights in green the integers that are coprime to each n. A small bar displays the count of coprime numbers, and these counts are gathered into a histogram that reveals the irregular pattern of totient values. The title and formula appear briefly, and the scene fades out at the end.
Created At
Apr 20, 2026, 02:38 AM
Duration
0:26
Tags
number-theorytotient