← ~/visualizations

generating-functions

Cycles through three linked views: (1) encoding a sequence a_n as an ordinary generating function A(x)=∑a_n x^n, (2) extracting a specific coefficient [x^n]A(x)=a_n with an animated scanner, and (3) showing how algebra on generating functions corresponds to sequence operations (index shift via x^k and convolution via the Cauchy product).

canvasclick to interact
t=0s

practical uses

  • 01.Solve counting problems by translating combinatorial constructions into algebraic equations in A(x).
  • 02.Derive and solve linear recurrences with constant coefficients using rational generating functions.
  • 03.Compute sequence convolutions (e.g., ways to combine independent choices) via multiplication of generating functions.

technical notes

Uses a 3-scene time loop (~3.2s each). All geometry snaps to a 4px grid for a blocky aesthetic. Animations use time-based phases and the provided cubic ease(). No external state; pure Canvas 2D drawing with lightweight shapes and monospace text.