# Prime to Prime: Get all first 25 Prime Numbers using up to 4 Primes

The first 25 Prime Numbers are

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

Using up to 4 prime numbers and the following mathematical operations, get all the 25 primes.

+ - x / ^ √ !

No other operators (like !!) are allowed.

## Other rules

• You cannot use same Prime Number more than once.
• You can use only Prime Numbers.
• Any number that appears as a number in the equation will be counted as one of the primes out of four (e.g. 7^2 means you have used both 7 and 2).
• You do not have to use all the 4 primes in every equation.
• You must use the SAME 4 primes in every equation. If you select say 2, 13, 17, 23 then they are the only primes that to appear in every equation to get the 25 primes.

I have 1 solution. There may be more.

• No partial answers... why? This seems like an exercise in tedium Dec 8, 2019 at 17:35
• Because there will be so many partial answers. If someone gets say 5 equations they will post an answer.
– DrD
Dec 8, 2019 at 18:15
• Are parentheses allowed?
– Jens
Dec 8, 2019 at 22:50
• Yes they are of course
– DrD
Dec 8, 2019 at 23:44
• I'm not going to answer, because I used a computer, but there are 145 multisets of primes under 100 which work; if you want a real challenge, try to find the one multiset of primes which works without using any factorials. Dec 10, 2019 at 14:56

Using 2,3,7,11:

$$2 = 2$$

$$3 = 3$$

$$5 = 11 + 3 - 7 -2$$

$$7 = 7$$

$$11 = 11$$

$$13 = 2 + 11$$

$$17 = 3! + 11$$

$$19 = 2^3 + 11$$

$$23 = 3 \cdot 7 + 2$$

$$29 = \frac{(7-2)!}{3} - 11$$

$$31 = 3 \cdot 11- 2$$

$$37 = (11-3!) \cdot 7 + 2$$

$$41 = 7^2 +3 - 11$$

$$43 = 2 \cdot 11 + 3 \cdot 7$$

$$47 = 3 \cdot 11 + 2 \cdot 7$$

$$53 = 2^ {3!} - 11$$

$$59 = 3! \cdot 11 - 7$$

$$61 = (11-2) \cdot 3! + 7$$

$$67 = 7 \cdot 2^3 + 11$$

$$71 = 2^{3!} + 7$$

$$73 = 3! \cdot 11 + 7$$

$$79 = 7 \cdot 11 + 2$$

$$83 = 7 \cdot 11 + 3!$$

$$89 = 7 \cdot 11 + 2 \cdot 3!$$

$$97 = (2+11) \cdot 7 + 3!$$

• Well played. I'm giving up hope on my own answer... must keep looking... Dec 8, 2019 at 23:14
• why not simply 5= 2+3 ? Dec 9, 2019 at 10:16

83 is probably not allowed - I swear I'll find a legitimate solution soon... arrgh...

Using 2,3,5,7:

$$2, 3, 5, 7 = 2, 3, 5, 7$$

$$11 = 7 + 5 + 2 - 3$$

$$13 = 7 + 5 + 3 - 2$$

$$17 = 7 \cdot 2 + 3$$

$$19 = 7 \cdot 2 + 5$$

$$23 = 7 \cdot 3 + 2$$

$$29 = 7 \cdot 5 - 3!$$

$$31 = 7 \cdot 5 - 3! + 2$$

$$37 = 7 \cdot 5 + 2$$

$$41 = 7 \cdot 5 + 3!$$

$$43 = 7 \cdot 5 + 3! + 2$$

$$47 = 7^2 +3 - 5$$

$$53 = \frac{5!}{2} - 7$$

$$59 = \frac{5!}{2} + 3! - 7$$

$$61 = \frac{5!}{2} + 7 - 3!$$

$$67 = \frac{5!}{2} + 7$$

$$71 = 3!^2 + 5 \cdot 7$$

$$73 = \frac{5!}{2} + 7 + 3!$$

$$79 = 7 \cdot (3! + 5) + 2$$

$$83 = 7 \cdot 2 \cdot 3! - \sqrt[\textbf{...}]{\sqrt{\sqrt{\sqrt{5}}}}$$

$$89 = 7 \cdot 2 \cdot 3! + 5$$

$$97 = 5! - 7 \cdot 3 - 2$$

I had to get creative with some of these, but this was easier than expected (except 83) - many patterns seen.

• You need to be exact. 83 is not right. But kudos for getting rest of them
– DrD
Dec 8, 2019 at 19:31
• I assume concatenation is not allowed either, otherwise we can do 83 = 73+2*5 Dec 8, 2019 at 21:33
• @DEEM 83 is exact here, due to the infinite number of roots. There was no restriction that the number of operations needs to be finite. Dec 9, 2019 at 5:07
• @trolley813 yeah, that was my original thought. Dec 9, 2019 at 13:35
• @Quintec there is a solution with 2,3,5 and another Prime without infinite roots.
– DrD
Dec 9, 2019 at 13:46

### Using 3, 5, 7, 11

2 = 5 - 3
3 = 3
5 = 5
7 = 7
11 = 11
13 = 7 + 3!
17 = 11 + 3!
19 = 3 × 5 + 11 - 7
23 = 11 + 7 + 5
29 = 5!/3 - 11
31 = 11 × 3 + 5 - 7
37 = 7 × 3! - 5
41 = 5 × 3! + 11
43 = 7 × 5 + 11 - 3
47 = 5!/3 + 7
53 = 7!/5! + 11
59 = 11 × 5 + 7 - 3
61 = 11 × 5 + 3!
67 = (3+5) × 7 + 11
71 = 7 × 11 - 3!
73 = 11 × 3! + 7
79 = 11 × 7 + 5 - 3
83 = 11 × 7 + 3!
89 = (11 + 5) × 3! - 7
97 = 11 × 7 + 5!/3!

89 was the hardest of these for me, followed by 67 and 53.