Visualizing the Recamán Sequence

Visualizing the Recamán Sequence
Loading the math board and drawing, please wait…
2020-09-20 09:58
This example visualizes the iterative construction of the Recamán sequence, showing how each new term is chosen by a deterministic rule that produces an intricate, seemingly irregular pattern. It highlights the phenomenon that a simple recurrence can generate complex structure when visualized step-by-step. The core math concepts are recursively defined sequences (Recamán sequence), modular arithmetic via Mod, conditional branching via If to select the next term, and Length measurements to map computed steps to geometric distances for drawing arcs/segments. Construction-wise, the GeoGebra command summary points to Mod (for rule selection based on current step), If (to decide between candidate operations), and Length (to compute distances used to update graphical objects). The setup also includes sequence state variables (n, Seq) and animation/interaction controls (buttons and parameters like speed and t), along with geometry-related objects (mid, radArc, radArc2, A/B, and labels) to display the evolving pattern clearly. Suitable for advanced secondary education through early university, especially for teaching number sequences, recurrence relations, and math visualization/interactivity.

GeoGebra Commands & Parameters

  1. Mod(n, 2) → test
  2. If(test ≟ 1, (2 * π), π) → umax
  3. If(test ≟ 1, π, 0) → umin
  4. Length(Seq) → lng
  5. If(Element[Seq, n + 1] < Element[Seq, n], 1, 0) → D

AI Drawing Prompt Reference

Create a visualization of an iteratively defined number sequence that builds an intricate, seemingly irregular geometric pattern as the step index n increases. At each step, compute the next sequence state and use conditional branching to choose the allowable angular magnitude: set umax and umin by selecting between π and 2π depending on a modular test of n. Measure the current sequence state using a length quantity (lng) to serve as the geometric scale for updates. Then compare consecutive sequence values to define a direction indicator D, which determines whether the construction for that step extends one way or the opposite way. Use these computed quantities to place each new arc or segment incrementally, and animate or step through the parameter so the evolving structure becomes clear.
The prompt above was compiled from the original drawing commands and is for reference only.