# Prime to Prime Sequel

This question is inspired by the Prime to Prime puzzle.

The first 24 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

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

+ - × /

No other operators are allowed (note the added restrictions from the previous question).

## Other rules

• You cannot use same prime number more than once in any equation.
• You can use only prime numbers.
• You do not have to use all the 4 primes in every equation.
• You must use the same set of 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 24 primes.
• Concatenation is forbidden.
• Parentheses are permitted.

Please refrain from posting partial solutions as there are many sets of primes which will not work.

• I will be really surprised if there is valid answer exists in this condition.
– Oray
Dec 11, 2019 at 12:29
• @Oray according to Peter Taylor's comment on the previous puzzle, there is one unique solution
– DrD
Dec 11, 2019 at 12:40
• @hexomino have you excluded ^ intentionally?
– DrD
Dec 11, 2019 at 12:47
• @DEEM Yes, ^ is excluded. Dec 11, 2019 at 12:48
• @athin I have decided to allow computers for this one, but if somebody comes up with a non-computer solution, that would be very interesting and impressive. Dec 11, 2019 at 14:16

$$2=2$$

$$3=3$$

$$5=2+3$$

$$7=\frac{43-3}{2}-13$$

$$11=43-2\cdot(13+3)$$

$$13=13$$

$$17=43-13\cdot2$$

$$19=13+3\cdot2$$

$$23=43-2\cdot(13-3)$$

$$29=43-13-3+2$$

$$31=43-13+3-2$$

$$37=43-3\cdot2$$

$$41=\frac{43+3\cdot13}{2}$$

$$43=43$$

$$47=2\cdot43-3\cdot13$$

$$53=43+13-3$$

$$59=43+13+3$$

$$61=43+13+3+2$$

$$67=2\cdot(43-3)-13$$

$$71=\frac{3\cdot43+13}{2}$$

$$73=2\cdot43-13$$

$$79=2\cdot(43+3)-13$$

$$83=2\cdot43-3$$

$$89=2\cdot43+3$$

• Great work! As far as I can tell, there is only one other set that works. Dec 12, 2019 at 10:12

Computer confirms that the only other solution is:

\begin{align*}2 &= 2 \\3 &= 3 \\5 &= (2 + 3) \\7 &= - ((3 - 17) / 2) \\11 &= (17 - (2 \cdot 3)) \\13 &= ((17 + 61) / (2 \cdot 3)) \\17 &= 17 \\19 &= (2 + 17) \\23 &= (17 + (2 \cdot 3)) \\29 &= - ((3 - 61) / 2) \\31 &= - (3 - (2 \cdot 17)) \\37 &= (3 + (2 \cdot 17)) \\41 &= (61 - (3 + 17)) \\43 &= ((2 - 3) - (17 - 61)) \\47 &= (61 + (3- 17)) \\53 &= (2 + (3 \cdot 17)) \\59 &= - (2 - 61) \\61 &= 61 \\67 &= (61 + (2 \cdot 3)) \\71 &= ((2 \cdot 61) - (3 \cdot 17)) \\73 &= - ((2 + 3) - (17 + 61)) \\79 &= - ((2 - 3) - (17 + 61)) \\83 &= ((2 + 3) + (17 + 61)) \\89 &= (61 - (2 \cdot (3 - 17)))\end{align*}

• That's the same set as in Oray's answer. Jan 31 at 11:45
• Sorry, lemme get the other one
– Sny
Jan 31 at 12:24
• @hexomino done.
– Sny
Jan 31 at 12:26
• Yes, very good, this was the other set I had found, +1 (P.S. some of your expressions need a little adjustment as they seem to give the negative value, e.g, 7) Jan 31 at 16:13
• Whoops, I used ~ for negative signs...
– Sny
Feb 1 at 2:21