Wednesday, May 28, 2025

Smallest prime where the successor of the product of primes up to it is not prime

Find a prime number p such that the number (2 ⋅ 3 ⋅ 5 ⋅ 7 ⋅⋅⋅ p) + 1 is not prime.

Let's break this problem down step by step.

Problem restatement:

Find a prime number $p$ such that the number

$$ (2 \cdot 3 \cdot 5 \cdot 7 \cdots p) + 1 $$

is not prime.

This is the product of all primes up to $p$ (the primorial of $p$) plus 1. You're being asked for the smallest prime $p$ where this is not prime (i.e., composite).


Step 1: Test Small Values of $p$

Let's compute $(2 \cdot 3 \cdot 5 \cdots p) + 1$ for successive primes until it's not prime.

  1. $p = 2$:

$$ 2 + 1 = 3 \text{ (prime)} $$

  1. $p = 3$:

$$ 2 \cdot 3 + 1 = 6 + 1 = 7 \text{ (prime)} $$

  1. $p = 5$:

$$ 2 \cdot 3 \cdot 5 + 1 = 30 + 1 = 31 \text{ (prime)} $$

  1. $p = 7$:

$$ 2 \cdot 3 \cdot 5 \cdot 7 + 1 = 210 + 1 = 211 \text{ (prime)} $$

  1. $p = 11$:

$$ 2 \cdot 3 \cdot 5 \cdot 7 \cdot 11 + 1 = 2310 + 1 = 2311 \text{ (test primality)} $$

Test 2311:

  • Not divisible by 13 (2311/13 = 177.76)
  • Not divisible by 17, 19, ... (test shows 2311 is prime)
  1. $p = 13$:

$$ 2 \cdot 3 \cdot 5 \cdot 7 \cdot 11 \cdot 13 + 1 = 30030 + 1 = 30031 $$

Test 30031: Check divisibility:

  • 30031 divided by 59:

$$ 30031 / 59 = 509 $$

Check:

$$ 59 \cdot 509 = 30031 \text{ ✅ } $$

So 30031 is composite.

✅ Therefore, the smallest prime $p$ such that $(2 \cdot 3 \cdot 5 \cdots p) + 1$ is not prime is

$$ \boxed{13} $$

No comments:

Post a Comment