TITLE The Kelp Forest of 3n + 1 PROMPT A data visualization of the Collatz conjecture drawn as an underwater kelp forest. Take any whole number: if even, halve it; if odd, triple it and add one; repeat. Every number ever tried ends at 1, and nobody can prove it always will. Here the reverse tree of all these paths (computed in the page for the first several thousand integers) grows up from the sea-floor root "1" as fronds: each step is a short segment that bends one way for an even step and the other way for an odd step, so the tree becomes a mass of swaying, curling, branching kelp. Concept: an unsolved problem that looks like something alive. Mood: sunlit shallows, curiosity, calm. Palette: pale aqua water #E6F4F1 (page ground: bright, light-filled water, not a dark ocean), deep teal #0B525B for mature stalks and type, fresh sea-green #65B891 for young fronds, warm orange #FF9F1C for the highlighted path and the garibaldi-like fish, abyssal ink #06262B for the root, holdfast and smallest text. Light page with soft vertical light shafts (very subtle paler bands drifting) and a sandy floor line. Construction: compute Collatz sequences for n = 1…N (N = 9,000 on desktop, 3,200 on phones) and build the merged tree (each number's parent is its next step). Draw from the root upward: each edge is a segment of length that shrinks slightly with depth; turning angle +a for a step arriving from an even number (n/2 branch) and −b for the odd branch ((n−1)/3), with a ≈ 8–10° and b ≈ 16–20° so the forest leans and curls gracefully (the well-known Collatz "seaweed" look), stroke width proportional to the log of the number of sequences passing through that edge (thick trunks near 1, 2, 4, 8, 16; hairline tips), colour blending from deep teal at the base to sea-green at the tips, slight transparency so overlaps build depth. Sway: every node's angle is perturbed by a slow travelling sine (a current) with amplitude growing toward the tips, so the entire forest undulates like kelp in swell; computed efficiently by re-evaluating angles along cached paths each frame, or by swaying in layers. Interaction: hover/touch near any frond tip or node: the nearest number is selected and its whole path to the root lights in orange with a thicker stroke: the signature moment: one bright thread running down through the forest to 1; a label shows the number, its number of steps ("27 takes 111 steps and climbs as high as 9,232 before coming down"), and a small inline chart of its trajectory (the "hailstone" plot, value against step, in orange on a log scale). A number field ("plant a number") accepts any integer up to about 10^12: its path is computed on the fly (BigInt or safe arithmetic) and drawn as a new orange frond that grows from the root upward segment by segment, joining the existing forest where it meets it; the label reports steps and peak. When a planted frond is longer than the forest, the view eases back to make room for it. Buttons for famous starters: 27, 97, 871, 6171, 837799 (the longest chain under a million: 524 steps). Two sliders drawn as brass dive-gauge dials: "even angle" and "odd angle" re-shape the forest live; a toggle "by height" recolours edges by the peak value of the paths through them. Dragging the water (anywhere without a node) pushes a current that bends fronds away and lets them swing back. Life: a few small fish in orange and teal (simple procedural shapes with tail wag) weave between the stalks following a flow field and scatter from the pointer; bubbles rise from the floor occasionally and fork around fronds; particles of marine snow drift; a sea-urchin-like "1" sits at the holdfast, labelled, with 2, 4, 8, 16 marked up the main trunk and the first fork at 16 → 5 annotated in tiny type ("the first place an odd number joins"). Layout and typography: the forest occupies the full viewport; text is set in the upper left as on a museum aquarium panel: title in a soft, bold serif (Georgia/Palatino bold) in deep teal: "The Kelp Forest of 3n + 1", then three short sentences stating the rule and the open question, with the rule also drawn as a tiny two-branch diagram; statistics strip along the bottom in tabular small caps: numbers planted, longest path so far, highest peak, "counter-examples found: 0". Hints are designed into the panel: "touch a tip to follow it home". Entrance: the forest grows from the root upward over about 2.5 seconds (edges revealed in breadth-first order with a slight spring at each tip) while the light shafts fade in, then begins to sway. Reduced motion: forest drawn complete and still; highlighted paths appear without growth. Performance: geometry cached in typed arrays; edges batched by width/colour buckets; DPR capped at 2; N adapted to device; pause when hidden. Keyboard: the number field and buttons are focusable; arrow keys step the selected number up and down by 1 to compare neighbours. DESCRIPTION A bright, sunlit aquarium tank in which the Collatz conjecture is a living plant. The reverse tree of every path from 1 to 9,000 grows out of a sea-urchin "1" on a sandy floor: thick deep-teal trunks through 2, 4, 8 and 16, thinning and paling into thousands of sea-green hairline fronds that lean and curl because even steps bend one way and odd steps the other. The whole forest sways in a slow travelling swell while garibaldi-orange and teal fish weave through it, bubbles rise and marine snow drifts. The page is set like a museum panel: a bold serif title and three plain sentences in the upper left with the rule drawn as a two-branch sprig, a cream instrument plate with a number field, famous starters and two brass dive-gauge dials, a specimen card with the hailstone plot, and a strip of statistics printed on the sand ending in "counter-examples found: 0". The signature moment is following a number home: one orange thread lighting the whole way down through the forest to 1. VISUAL TECHNIQUES - Merged Collatz tree computed in the page and stored in typed arrays, parents always before children so positions resolve in one pass - Turtle-style geometry: per-node cumulative angle (+even, -odd), segment length shrinking with depth, whole form rotated so its centre of mass stands upright and fitted to the viewport by percentile bounds - Canvas 2D rendering batched into width-by-colour buckets; stroke width from the log of the number of sequences through each edge; teal-to-green depth gradient or a pale-to-ink "by height" peak scale - Sway from two travelling sine waves sampled at each parent position, with amplitude growing toward the tips - A spring-damped grid of current values, bilinearly sampled, for the draggable water that bends fronds and lets them swing back - Entrance growth by depth front with a damped-spring overshoot on each newly revealed segment, statistics counting up with it - Orange highlighted path with pale halo, core and inner glint, drawn through the same sway field so it stays fused to the forest; BigInt arithmetic for planted numbers up to 10^12 - Smoothly eased re-fit of scale and root when a planted frond outgrows the forest or the dials reshape it - Procedural fish with wagging tails steered by a flow field and pointer panic; bubbles deflected by a node-density grid; marine snow; skewed drifting light shafts; sand with ripples and specks; SVG grain - SVG brass gauge dials with gradients, ticks, needle and glass highlight; inline hailstone chart on a log scale - Museum-panel typography: bold Georgia title, letterspaced Gill Sans small capitals, tabular lining numerals INTERACTION MODEL Moving the pointer near any node (or tapping near one on a touch screen) selects the nearest number: an orange thread runs from that tip down to the root, a tag names the number, and the specimen card reports its steps, its peak and its hailstone plot. Dragging anywhere in the water pushes a current that bends nearby fronds, nudges fish, bubbles and snow, and then springs back; fish scatter from the pointer. Typing a whole number up to 1,000,000,000,000 in "plant a number" (or pressing a famous starter: 27, 97, 871, 6171, 837,799) grows its path from the root upward segment by segment, joining the forest where it meets it, and updates the statistics; invalid entries get a short inline note. The two brass dials (drag, arrow keys, Page Up/Down, Home/End, double-click to reset) change the even and odd turning angles and re-shape the forest live; the "by height" switch recolours every edge by the highest peak passing through it. Left and right arrow keys step the selected number down or up by one to compare neighbours. On phones the dials open from a brass gauge button and the specimen card takes the place of the introductory text. With reduced motion the forest is drawn complete and still, and paths appear without growth.