'''Primer''' is a [[pattern]] that was constructed by [[Dean Hickerson]] on November 1, [[:Category:Patterns found in 1991|1991]] that produces a stream of [[lightweight spaceship]]s representing prime numbers. N is prime if and only if a lightweight spaceship is above the [[honeycomb]] at the bottom-left corner of the pattern at [[generation]] 120N ticks.<ref>PRIMES.LIF from [[Alan Hensel]]'s [http://www.ibiblio.org/lifepatterns/ lifep.zip pattern collection]. Accessed on July 28, 2009.</ref><ref>four-primers.rle.gz from [[Golly]]'s built-in pattern catalogue. Accessed on July 28, 2009.</ref> It was the first pattern created that computes prime numbers, though others have since been constructed using the same ideas (see [[glider gunless primer]]).
'''Primer''' is a [[pattern]] that was constructed by [[Dean Hickerson]] on November 1, [[:Category:Patterns found in 1991|1991]] that produces a stream of [[lightweight spaceship]]s representing prime numbers. N is prime if and only if a lightweight spaceship escapes to the left of the [[pentadecathlon]] at the bottom-left corner of the pattern at [[generation]] 120N.<ref>PRIMES.LIF from [[Alan Hensel]]'s [http://www.ibiblio.org/lifepatterns/ lifep.zip pattern collection]. Accessed on July 28, 2009.</ref><ref>four-primers.rle.gz from [[Golly]]'s built-in pattern catalogue. Accessed on July 28, 2009.</ref> It was the first pattern created that computes prime numbers, though others have since been constructed using the same ideas (see [[glider gunless primer]]).
It works by using [[glider]]s to emulate a [http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes prime number sieve]. Lightweight spaceships that move westward are deleted by gliders that represent positive integers if the lightweight spaceship represents a multiple of that number.
It works by using [[glider]]s to emulate a [http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes prime number sieve]. Lightweight spaceships that move westward are deleted by gliders that represent positive integers if the lightweight spaceship represents a multiple of that number.
Note that the numbers 2 and 3 are not outputted; the stream of prime numbers starts with 5.
==Image gallery==
==Image gallery==
{|
{|
|-
|-
|[[Image:Primer_lowerleft.png|framed|The honeycomb at the bottom-left corner]]
|[[Image:Primer_stream.png|thumb|The stream of spaceships representing prime numbers]]
|[[Image:Primer_stream.png|thumb|The stream of spaceships representing prime numbers]]
|}
==Videos==
{|
|-
|{{#ev:youtube|68nEX5CEmZE|300|left|Primer outputting the prime numbers from 2 through 37}}
Primer is a pattern that was constructed by Dean Hickerson on November 1, 1991 that produces a stream of lightweight spaceships representing prime numbers. N is prime if and only if a lightweight spaceship escapes to the left of the pentadecathlon at the bottom-left corner of the pattern at generation 120N.[1][2] It was the first pattern created that computes prime numbers, though others have since been constructed using the same ideas (see glider gunless primer).
It works by using gliders to emulate a prime number sieve. Lightweight spaceships that move westward are deleted by gliders that represent positive integers if the lightweight spaceship represents a multiple of that number.