IA idea · Pure maths, number & proof
How many primes are there below n? Testing the prime number theorem
Research question
How accurately do x/ln x and the logarithmic integral approximate the number of primes below x for x up to 10⁷, and how does the relative error behave?
Make it yours, then agree it with your teacher.
Next step: plan this IA free — the planner opens with this question filled in. For feedback on your own draft, the IA package (€39 once) gives you 5 AI feedback credits and every annotated exemplar in full.
Why it makes a good exploration
Primes look random, yet their count follows a smooth law. Testing the approximations yourself, and measuring how slowly the error shrinks, connects number theory with modelling.
The mathematics you'll need
- Counting functions and logarithms
- Relative and absolute error
- Integration: the logarithmic integral (explain; evaluate numerically)
- Modelling error against x on log scales
Where the data comes from
Generate primes with a sieve (spreadsheet or program); check counts against OEIS.
- OEIS (On-Line Encyclopedia of Integer Sequences) — Check a sequence you have found and read its known formulas and references.
A possible outline
- Explain the sieve and count primes.
- Compare with x/ln x.
- Compare with Li(x).
- Model the relative error.
- Reflect on why the prime number theorem is about ratios, not differences.
Pitfalls that cost marks
- Code with no explanation.
- Confusing log bases.
- Presenting tables without interpretation.
Showing personal engagement
- Explore twin primes or primes in arithmetic progressions.
- Make a prediction for 10⁸ and check with published counts.
- Explain the theorem's history briefly.
See Criterion C: personal engagement for what examiners look for.
Which course is it for?
| Course | Fit | Maths to lean on |
|---|---|---|
| AA SL | Good fit | Counting functions and logarithms; Relative and absolute error |
| AA HL | Good fit | Counting functions and logarithms; Relative and absolute error |
| AI SL | Good fit | Counting functions and logarithms; Relative and absolute error |
| AI HL | Not a natural fit | The mathematics is mainly from the AA course; an AI HL version would need modelling with technology, statistics or networks at HL level. |
Level: Solid. Needs some independent work beyond class examples. See how the IA differs between AA and AI, SL and HL.
How this idea reaches the top bands
Reflection (D)
For this idea, start with the weak points: code with no explanation; and confusing log bases. Say how each one affects your answer.
Use of mathematics (E)
SL: counting functions and logarithms; relative and absolute error; integration: the logarithmic integral (explain; evaluate numerically); modelling error against x on log scales, each explained in your own words and carried out correctly.
How pure maths explorations reach the top bands in general: Pure maths, number & proof IA ideas. Guides: A · B · C · D · E · self-grade sheet.
Taking it further
Investigate the average gap between primes near x and compare with ln x.
Extending it for HL
Add an HL technique the question genuinely needs: what an HL pure maths exploration adds.
See a complete IA, marked
When can we launch? Modelling the tide at our sailing club's slipway (AA SL) is a complete pure maths exploration, marked on every criterion.
Frequently asked questions
Which IB Maths course is this IA idea for?
It works for AA SL, AA HL and AI SL. We rate it Solid: it needs some independent work beyond class examples.
What mathematics does this IA use?
Counting functions and logarithms, relative and absolute error, integration: the logarithmic integral (explain; evaluate numerically) and modelling error against x on log scales.
Where can I get data for this IA?
Generate primes with a sieve (spreadsheet or program); check counts against OEIS. Checked sources and tools: OEIS (On-Line Encyclopedia of Integer Sequences).
Turn this idea into your IA
The planner opens with “How many primes are there below n? Testing the prime number theorem” filled in: the question, the maths and the data sources.
Your plan is kept in this browser. A free account keeps it with your drafts on any device: Join free · Sign in
Also: free IA self-check · A–E checklist (PDF) · have a draft? AI feedback or a review with Pete (€100)
Writing it up: how to write a Maths IA, step by step · structure and format · mistakes that cost marks · annotated exemplars, marked on every criterion
Similar ideas
- The Collatz conjecture: what can we say about stopping times?AA SLAA HLAI SLAI HLSolid
- How far does a bouncing ball really travel?AA SLAI SLAA HLAI HLAccessible
- How long is a coastline? Measuring fractal dimensionAA SLAA HLAI SLAI HLSolid
- Does Benford's law hold for the populations of the world's towns?AI SLAI HLAA HLSolid
All pure maths ideas · AA SL ideas · AA HL ideas · AI SL ideas · All 239 IA ideas