Skip to content
Allin

First n prime numbers

List the first n prime numbers — the building blocks of arithmetic that have no divisors but 1 and themselves. Enter how many you want (up to 10,000) and it returns the sequence, the nth prime itself and the sum of them all.

List of prime numbersList every prime number up to a chosen limit, using the Sieve of Eratosthenes. Enter an upper bound (up to 100,000) and it returns all primes at or below it, how many there are and their sum — a quick reference for factoring and number theory.Twin prime finderFind every pair of twin primes up to a limit — primes that differ by exactly 2, like (11, 13) or (17, 19). Enter an upper bound (up to 1,000,000) and it lists the pairs and counts them. Whether infinitely many exist is one of the oldest open problems in mathematics.Prime factorization calculatorBreak a whole number down into the product of its prime factors.Prime number checkerCheck whether a number is prime and find its smallest divisor.Mersenne Prime CheckerRun the Lucas-Lehmer test on 2^p - 1 for any exponent p up to 5000, with the digit count, the rank in the known list and the even perfect number it generates.Prime Factor CalculatorFactor any integer up to 10^15 with Pollard's rho and Miller-Rabin, with the factor tree, exponent form, divisor count, sigma and Euler's totient.Cube numbers listGenerate a list of perfect cubes — n³ for consecutive integers from any starting point. Set how many you want and where to start, and it returns the cubes, their sum and the underlying roots, computed with exact big-integer arithmetic.List of Fibonacci numbersGenerate the first n Fibonacci numbers exactly, with big-integer precision — each term the sum of the two before it, starting 0, 1, 1, 2, 3, 5, 8… The sequence hides the golden ratio and shows up throughout nature and mathematics. Returns the list and its sum.

Enter How many primes (1–10000) and the First n prime numbers works out Prime numbers, The nth prime, Sum straight away. For instance, with How many primes (1–10000) = 100 it returns Prime numbers = 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, The nth prime = 541 and Sum = 24,133.

How to use it

  1. Enter your values: How many primes (1–10000).
  2. Read the result instantly: Prime numbers, The nth prime, Sum.

Frequently asked questions

How does the First n prime numbers work?

It takes How many primes (1–10000) and derives Prime numbers, The nth prime and Sum from them. The calculation is live as you type, so the result updates on every change.

Which values does the calculator ask for?

A single value: How many primes (1–10000). Nothing else is required — no account, no file upload.

What does a typical calculation look like?

With How many primes (1–10000) = 100, the calculator returns Prime numbers = 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, The nth prime = 541 and Sum = 24,133. Those figures come from running this exact tool, so you can reproduce them by entering the same values.

How much does the result change with different inputs?

It moves a lot. Using How many primes (1–10000) = 200 instead, The nth prime goes from 541 to 1,223 — which is why it is worth testing a few scenarios rather than trusting a single figure.

What does it give for smaller values?

Scaled down to How many primes (1–10000) = 50, The nth prime comes out at 229. The relationship is worth checking at both ends before you rely on a single result.

When would I actually use this?

Reading a number written another way: a Roman numeral on a monument, a hexadecimal colour, a binary byte, or a fraction that needs reducing.

What is the most common mistake?

Assuming a decimal fraction survives a change of base. A tenth is exact in decimal and infinitely repeating in binary, which is why 0.1 + 0.2 is not 0.3 in most programming languages.

What is the difference between the First n prime numbers and the List of prime numbers?

This one returns The nth prime; the List of prime numbers returns How many primes. That is the whole difference — open the one whose figure you need.

Is there a tool for the next step?

Twin prime finder is the closest one after this: Find every pair of twin primes up to a limit — primes that differ by exactly 2, like (11, 13) or (17, 19). Enter an upper bound (up to 1,000,000) and it lists the pairs and counts them. Whether infinitely many exist is one of the oldest open problems in mathematics.

What else is worth having open alongside it?

Prime factorization calculator and Prime number checker — they come up in the same task often enough to be worth a second tab.

Further reading

All guides