16
$\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.
NO PARTIAL ANSWERS.

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

3 Answers 3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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