Each wave is cos(2πx/n). A wave peaks at 1 exactly when
n divides x. Add more waves (more factors n tested,
up to 1000) and watch which numbers stop "looking prime." The x-axis range grows
automatically so the largest wave's full period stays in view.
Testing factors n = 2 through2
Panel A — the waves
Dots mark where a wave hits its peak (1) — i.e. where n divides x. Shaded columns are the actual primes.
Panel B — peaks per number, using only the waves shown above
Height = how many of the currently-active waves (n = 2..N) peak at that x.
prime, 0 peaks (correct) composite, 0 peaks — not caught yet composite, ≥1 peak (caught)