Examples of Patterns in Prime Numbers: 3 Project Examples for Curious Students

If you’re hunting for math fair inspiration, prime numbers are a gold mine. This guide gives you clear, classroom-tested **examples of patterns in prime numbers: 3 project examples** you can actually build, analyze, and present. Instead of vague theory, you’ll get real examples that show how primes behave, how often they appear, and where surprising structure shows up in what looks like pure randomness. We’ll walk through three main prime-pattern projects, plus several side experiments you can bolt on if you want to level up to a regional or state science fair. Along the way, you’ll see examples of how to collect data, graph results, and compare your findings to what professional mathematicians have discovered. You don’t need advanced calculus—just algebra, spreadsheets, and curiosity. Whether you’re in middle school testing simple prime gaps or in high school exploring deeper conjectures, you’ll find at least one example of a project here that fits your level and time frame.
Written by
Jamie
Published

When students ask for examples of patterns in prime numbers, prime gaps are usually my first stop. A prime gap is the difference between one prime and the next: for example, between 11 and 13 the gap is 2; between 13 and 17 the gap is 4.

This is the best example of a project that feels simple to start but can grow into a serious investigation.

How to build the prime gap project

You can organize this project around three main tasks:

  • Generate a list of primes up to some limit (10,000 is very manageable with a computer or spreadsheet).
  • Compute the gaps between consecutive primes.
  • Analyze how those gaps behave and whether any patterns appear.

You can code your own prime generator in Python, use the Sieve of Eratosthenes in a spreadsheet, or pull a verified list of primes from a math site like OEIS (the Online Encyclopedia of Integer Sequences, widely used by researchers).

Once you have the primes, compute gaps:

  • Between 2 and 3: gap = 1
  • Between 3 and 5: gap = 2
  • Between 5 and 7: gap = 2
  • Between 7 and 11: gap = 4
  • Between 11 and 13: gap = 2
  • Between 13 and 17: gap = 4

Already you see one of the classic examples of structure: after 2 and 3, all prime gaps are even. That’s not an accident—once you pass 2, all primes are odd, so the distance between them must be an even number.

Questions you can investigate

Here are several real examples of questions that turn this into a strong science fair project:

  • How often do different gap sizes appear up to 1,000, 10,000, or 100,000?
  • Does the average prime gap increase as numbers get larger?
  • Are small gaps (like 2 and 4) less common among large primes than among small primes?
  • Do your data support the idea that primes get “sparser” as numbers grow?

Mathematicians have long suspected that the average gap near a number \(n\) is about \(\log n\). You can test a basic version of this by comparing your average gap in different ranges:

  • From 2 to 1,000
  • From 1,000 to 10,000
  • From 10,000 to 100,000

If your averages increase roughly like the logarithm, you’ve got a nice example of how school-level data connects to real research.

Extending the project (for advanced students)

If you want to go beyond the basics, here are some examples include style extensions:

  • Compare your gap distribution to a random model. Generate random odd numbers and measure “gaps” between those that pass a simple test, then compare histograms.
  • Investigate the largest gap you find below 1,000, 10,000, and 100,000, and compare with known record gaps listed on math sites such as Prime Pages.
  • Explore whether the proportion of gaps of size 2 (twin primes) seems to decrease, and connect that to the twin prime conjecture, which says there are infinitely many primes that differ by 2.

For background on primes and related open problems, a solid, readable source is the Clay Mathematics Institute, which discusses unsolved prime-related questions.

In short, among the best examples of patterns in prime numbers: 3 project examples, prime gaps give you clear data, simple graphs, and a strong story: primes look random, but their spacing follows statistical patterns you can measure.


Project 2: Twin Primes and Prime Constellations

If you want a project with a bit of drama, twin primes are hard to beat. Examples of patterns in prime numbers don’t get more famous than pairs like (3, 5), (5, 7), (11, 13), or (17, 19), where both numbers are prime and differ by 2.

This is a natural example of a project that connects directly to modern research. In 2013, mathematician Yitang Zhang proved that there are infinitely many primes at most 70 million units apart, which was a breakthrough related to the twin prime conjecture. That result kicked off a wave of work in analytic number theory.

Building the twin prime project

You can frame this project around counting and comparing:

  • Generate primes up to a limit (say 100,000).
  • Identify all twin prime pairs (p, p + 2).
  • Count how many such pairs occur in different ranges (e.g., 2–1,000; 1,000–10,000; 10,000–100,000).

Then, calculate:

  • The total number of twin prime pairs in each range.
  • The proportion of primes that are part of twin pairs in each range.

Plot these values and see how they change. Your graphs become real examples of how a famous conjecture looks at a finite scale.

Adding prime constellations

To strengthen your entry in a category like “Mathematics and Computer Science,” don’t stop at twin primes. Add prime constellations, which are small patterns of primes with fixed gaps. Examples include:

  • Prime triplets like (5, 7, 11) with gaps (2, 4)
  • Prime quadruplets like (5, 7, 11, 13)
  • Patterns like (p, p+4, p+6)

You can:

  • Define 2–3 constellations (for example, twin primes, triplets, and quadruplets).
  • Search your prime list for each pattern.
  • Compare how often each pattern appears in different ranges.

These constellations give you multiple examples of patterns in prime numbers: 3 project examples wrapped into one study: twin pairs, triplets, and quadruplets.

Interpreting your data

Use your results to answer questions such as:

  • Do twin primes appear to get rarer as numbers grow?
  • Are triplets and quadruplets much less common than twin primes in your data?
  • Does the ratio of twin primes to all primes seem to decrease with your upper bound?

You can then compare your observations with known conjectures like the Hardy–Littlewood prime k-tuple conjecture, which predicts how often certain patterns of primes should appear. A readable introduction to primes and related patterns is available from the American Mathematical Society, which often features short notes on prime-related topics.

This project works beautifully in a poster format: one section for twin primes, one for triplets, one for quadruplets. That way you clearly highlight three examples of patterns in prime numbers without overwhelming the judge.


Project 3: Prime Numbers on the Number Line – Mod Patterns and Visual Structure

The third project focuses on visual and modular patterns—how primes behave when you group numbers by remainders. This gives you some of the most striking examples of patterns in prime numbers: 3 project examples you can literally see in a chart or graph.

Exploring primes modulo small numbers

Take all integers and group them by their remainder when divided by a small number (called working modulo that number). For example, working mod 6, every integer is in one of these classes:

  • 0 mod 6: 6, 12, 18, 24, ...
  • 1 mod 6: 1, 7, 13, 19, ...
  • 2 mod 6: 2, 8, 14, 20, ...
  • 3 mod 6: 3, 9, 15, 21, ...
  • 4 mod 6: 4, 10, 16, 22, ...
  • 5 mod 6: 5, 11, 17, 23, ...

Now highlight which of these numbers are prime. You’ll find one of the nicest examples include patterns: except for the tiny primes 2 and 3, every prime is either 1 mod 6 or 5 mod 6. In other words, for large numbers, primes only live in two of the six remainder classes.

You can repeat this with other mod values:

  • Mod 4: primes beyond 2 are always 1 or 3 mod 4.
  • Mod 5: primes beyond 5 avoid the 0, 2, and 4 classes.

These modular regularities are classic examples of patterns in prime numbers that are easy to show with color-coded tables or scatter plots.

Turning this into a science fair project

To turn this into a project instead of a classroom worksheet, you need data and comparisons:

  • Pick 2–3 mod values (for example, 4, 6, 10).
  • For each, classify all numbers up to 10,000 by remainder.
  • Mark which are prime and compute:
    • How many primes appear in each remainder class.
    • What percentage of numbers in each class are prime.

You can then:

  • Compare how “prime-dense” each remainder class is.
  • Show that some classes never contain primes (for example, 0 mod 6 beyond 6 itself).
  • Explain why: if a number is 0 mod 6, it’s divisible by 6 and can’t be prime.

This project gives a clear example of how basic arithmetic (division with remainder) explains where primes can and cannot appear.

Visual pattern examples: Ulam spiral and beyond

If you want a more artistic angle, consider visual layouts that produce real examples of prime patterns:

  • Ulam spiral: Arrange positive integers in a square spiral and highlight primes. Diagonal streaks of primes appear, showing that certain quadratic formulas produce many primes.
  • Prime grids: Place numbers in a grid (like 100 by 100) and mark primes. You’ll see clusters and streaks that are far from random noise.

You can:

  • Generate these grids with a simple program or spreadsheet.
  • Count how many primes lie on certain diagonals or lines.
  • Compare your counts to what you’d expect if primes were purely random.

For background on visual prime patterns and their connection to deeper math, the MIT OpenCourseWare materials on number theory are a good starting point, even if you only skim the introductory sections.

This project rounds out our examples of patterns in prime numbers: 3 project examples by focusing on structure you can literally see, rather than just compute.


Other Real Examples You Can Add or Combine

If you want to go beyond the three main projects or mix and match, here are additional real examples of prime-pattern ideas that work well in a science fair context:

  • Distribution of primes in intervals: Count primes in blocks like [1, 1,000], [1,001, 2,000], and so on, and compare to the prediction from the prime number theorem (about n / log n primes below n). This connects your data to one of the central results in number theory.
  • Last digits of primes: Beyond 5, primes in base 10 must end in 1, 3, 7, or 9. Are these last digits equally common up to 100,000? Graph the frequencies and test for bias.
  • Sum of digits of primes: Look at the sum of the digits of each prime and see whether some sums are more common. For example, do primes more often have digit sums that are odd or even?
  • Prime factorizations of neighboring numbers: Take numbers right next to primes (like p−1 and p+1) and analyze their factors. Do they tend to have more small factors than random numbers?

You can treat these as separate mini-projects or attach one or two as “extensions” to your main science fair entry, giving judges more examples of patterns in prime numbers to ask about.


Tips for Turning These Ideas into a Strong Science Fair Project

You now have several examples of patterns in prime numbers: 3 project examples plus extra variations. To make them stand out in a fair setting:

  • State a clear question. For example: “How does the average gap between primes change as numbers grow?” or “Which remainder classes modulo 6 contain primes, and why?”
  • Collect enough data. For computer-based projects, going up to 100,000 or even 1,000,000 is realistic in 2024–2025 with a laptop and a simple script.
  • Visualize aggressively. Histograms of prime gaps, bar charts of twin prime counts, and color-coded mod tables make the patterns obvious.
  • Connect to real research. Mention modern results (like Zhang’s work on bounded gaps between primes) and classic ideas (like the prime number theorem). Judges appreciate seeing that your examples include links to current math.
  • Be honest about limits. You won’t prove big conjectures, but you can show that your data is consistent with them, which is exactly what a strong student project should do.

In other words, primes give you an almost unfair advantage: they’re famous, mysterious, and surprisingly accessible. Use these examples of patterns in prime numbers: 3 project examples as your starting point, then add your own twist.


FAQ: Patterns in Prime Numbers

Q1. Can you give a simple example of a pattern in prime numbers for middle school?
Yes. One very simple example of a pattern is that, except for 2, all primes are odd. Even more interesting: except for 2 and 3, every prime is either 1 or 5 modulo 6. That means if you divide a prime (bigger than 3) by 6, the remainder is always 1 or 5.

Q2. What are some easy examples of prime number projects that don’t need coding?
You can hand-generate primes up to a few hundred using the Sieve of Eratosthenes and then study patterns like last digits, small prime gaps, or which numbers from 1 to 200 are prime versus composite. These are real examples that only require paper, pencil, and maybe a calculator.

Q3. Are there real-world applications for the patterns I find in these projects?
Yes. Prime distributions and patterns are central to modern cryptography, especially public-key systems like RSA. While your science fair project won’t break encryption, it uses the same ideas about how primes are spaced and how hard it is to factor large numbers.

Q4. How far should I go with data to make my project competitive in 2024–2025?
For a local fair, going up to 10,000 or 100,000 is usually enough. For regional or state levels, using a computer to extend your data up to 1,000,000 and running basic statistical tests (like comparing to n / log n) will make your examples of patterns in prime numbers much more impressive.

Q5. Do mathematicians already know every pattern in prime numbers?
Not even close. We know many regularities—like how many primes are roughly below a given number—but huge open questions remain, such as the twin prime conjecture and the Riemann hypothesis. Your project is a small-scale version of the same search for structure in primes that professional mathematicians are still working on.

Explore More Mathematics Projects

Discover more examples and insights in this category.

View All Mathematics Projects