18
$\begingroup$

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 programming please (see the sequel if that's your bag).
NO PARTIAL ANSWERS.

$\endgroup$
11
  • 4
    $\begingroup$ No partial answers... why? This seems like an exercise in tedium $\endgroup$
    – Quintec
    Commented Dec 8, 2019 at 17:35
  • 3
    $\begingroup$ Because there will be so many partial answers. If someone gets say 5 equations they will post an answer. $\endgroup$
    – DrD
    Commented Dec 8, 2019 at 18:15
  • 2
    $\begingroup$ Are parentheses allowed? $\endgroup$
    – Jens
    Commented Dec 8, 2019 at 22:50
  • 1
    $\begingroup$ Yes they are of course $\endgroup$
    – DrD
    Commented Dec 8, 2019 at 23:44
  • 2
    $\begingroup$ 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. $\endgroup$ Commented Dec 10, 2019 at 14:56

4 Answers 4

22
$\begingroup$

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!$

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

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.

$\endgroup$
11
  • 3
    $\begingroup$ You need to be exact. 83 is not right. But kudos for getting rest of them $\endgroup$
    – DrD
    Commented Dec 8, 2019 at 19:31
  • 5
    $\begingroup$ I assume concatenation is not allowed either, otherwise we can do 83 = 73+2*5 $\endgroup$
    – ThomasL
    Commented Dec 8, 2019 at 21:33
  • 12
    $\begingroup$ @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. $\endgroup$
    – trolley813
    Commented Dec 9, 2019 at 5:07
  • 3
    $\begingroup$ @trolley813 yeah, that was my original thought. $\endgroup$
    – Quintec
    Commented Dec 9, 2019 at 13:35
  • 3
    $\begingroup$ @Quintec there is a solution with 2,3,5 and another Prime without infinite roots. $\endgroup$
    – DrD
    Commented Dec 9, 2019 at 13:46
8
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

Using 2, 3, 5, 17

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

67 & 71 were hardest here, but their solutions came as a pair.

$\endgroup$
2
  • $\begingroup$ Your 89 looks wrong to me. 89 =17 x 5 - 2 + 3! works - well done for the others. $\endgroup$
    – ThomasL
    Commented Jun 5 at 16:32
  • 1
    $\begingroup$ Yes, the perils of mental arithmetic - fixed now. $\endgroup$ Commented Jun 5 at 16:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.