Fortunate Number Calculator

Find the smallest gap after a primorial that lands on a prime number.

Math and PercentUpdated 2026-11-182 min read
Fortunate Number Calculator
A whole number from 1 to 50.
Fortunate number
...
Primorial used...
Prime reached...

What it does

Fortunate numbers are defined from primorials. Take the product of the first n primes, then find the smallest integer m greater than one such that the product plus m is prime. That value m is the nth Fortunate number. The sequence begins 3, 5, 7, 13, 23, 17, 19 and 23.

For n equal to five the primorial is 2 times 3 times 5 times 7 times 11, which is 2310. The smallest m greater than one giving a prime is 23, producing 2333.

The numbers are named after Reo Fortune, who proposed the conjecture that every Fortunate number is prime. The conjecture remains open, which makes these values a small but intriguing object of study.

This page builds the primorial from the first n primes, then searches upward for the first prime beyond it. A guard bounds the search so the page cannot loop without end.

The index limit is 50. At that size the primorial has many digits, so the tool uses exact integer arithmetic throughout.

How to use

  1. Enter an index n from 1 to 50.
  2. Read the Fortunate number in the main result box.
  3. Check the primorial that was used beside it.
  4. The resulting prime is shown for verification.
  5. The default n = 5 reproduces the worked example.
  6. Try n = 1 to see the smallest Fortunate number.

Formula

F(n) = least m > 1 such that p(n)# + m is prime, where p(n)# is the product of the first n primes
n
The number of initial primes in the primorial.
p(n)#
The product of the first n primes.
m
The Fortunate number, the least gap to the next prime.

The condition m greater than one excludes the trivial gap of one. The primorial is divisible by every small prime, so the search skips many composite candidates quickly. A guard caps how many candidates are tried.

Worked example

Example: n = 5

The page opens with n = 5.

  1. List the first five primes: 2, 3, 5, 7 and 11.
  2. Multiply them: 2 x 3 x 5 x 7 x 11 = 2310.
  3. Try values of m greater than one and test 2310 + m for primality.
  4. Values such as 3, 5, 7, 11, 13 and 17 give composites.
  5. With m = 23 we get 2333, which is prime.
  6. The tool reports fortunate 23, primorial 2310 and prime 2333.

Reference table

Fortunate numbers at small indices
nPrimorialFortunate numberPrime reached
1235
26511
330737
421013223
52310232333

Limits

  • Indices above 50 are rejected to keep the printed primorial manageable.
  • The prime search has a fixed guard.
  • The tool computes one Fortunate number, not the whole sequence up to n.
  • The conjecture that every Fortunate number is prime is not proved here.

Common mistakes

  • Allowing m equal to one, which changes the sequence.
  • Using the first n integers rather than the first n primes.
  • Assuming the Fortunate number is always the next prime gap.
  • Expecting the primorial to be prime.
  • Using floating point multiplication for the primorial.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is the first Fortunate number?

3, since the first primorial is 2 and 2 + 3 = 5 is prime.

What is the fifth Fortunate number?

23, since 2310 + 23 = 2333 is prime.

Why exclude m equal to one?

That value is excluded by the standard definition of the sequence.

Questions

Who are Fortunate numbers named after?

They are named after Reo Fortune.

What is the open conjecture?

That every Fortunate number is prime.

What is a primorial?

The product of the first n prime numbers.

Is the prime search bounded?

Yes, a guard prevents an endless loop.

Are values exact?

Yes, integer arithmetic is used.

What index range is accepted?

Whole numbers from 1 through 50.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.