← Back to Application

Collatz mod P - Help

This application visualizes Collatz-like processes modulo P as interactive graphs. It explores generalized sequences where odd numbers follow the rule Nx + M instead of the standard 3x + 1.

Mathematical Background

The Collatz conjecture involves iterating the function:

This application generalizes this to Nx + M for odd numbers and visualizes the resulting directed graph modulo P.

The graph represents the dynamics of this generalized Collatz function on residue classes modulo P. Each node represents a residue class [i] = {i + kP | k ∈ ℤ}, and edges represent the function transitions between these classes.

Parameters

Cycles

Graph Interpretation

Special Cases

When P is a power of 2, the graph becomes a De Bruijn graph, and the symmetrize function applies a special transformation based on binary representations.

Toys

← Return to Application