Post History
Goldbach's Conjecture states that every even whole number greater than 2 is the sum of 2 prime numbers. Your task is to return those 2 prime numbers, given an even whole number as input. There are ...
#2: Post edited
Solve Goldbach's Conjecture
- [Goldbach's Conjecture](https://en.wikipedia.org/wiki/Goldbach%27s_conjecture) states that every even whole number greater than 2 is the sum of 2 prime numbers. Your task is to return those 2 prime numbers, given an even whole number as input. There are often multiple solutions - any solution will do.
- # Input/Output Examples
- These examples only show one of potentially many possible outputs.
- ```
- 4 -> 2, 2
- 6 -> 3, 3
- 24 -> 5, 19
- 120 -> 7, 113
- 1000 -> 3, 997
- ```
This is code golf, so shortest answer in each language wins.- P.S. If no one finds a test case that has no solution, I'll consider the problem solved by engineer's induction.
- [Goldbach's Conjecture](https://en.wikipedia.org/wiki/Goldbach%27s_conjecture) states that every even whole number greater than 2 is the sum of 2 prime numbers. Your task is to return those 2 prime numbers, given an even whole number as input. There are often multiple solutions - any solution will do.
- # Input/Output Examples
- These examples only show one of potentially many possible outputs.
- ```
- 4 -> 2, 2
- 6 -> 3, 3
- 24 -> 5, 19
- 120 -> 7, 113
- 1000 -> 3, 997
- ```
- This is <a class="badge is-tag">code-golf</a>, so shortest answer in each language wins.
- P.S. If no one finds a test case that has no solution, I'll consider the problem solved by engineer's induction.
#1: Initial revision
Solve Goldbach's Conjecture
[Goldbach's Conjecture](https://en.wikipedia.org/wiki/Goldbach%27s_conjecture) states that every even whole number greater than 2 is the sum of 2 prime numbers. Your task is to return those 2 prime numbers, given an even whole number as input. There are often multiple solutions - any solution will do. # Input/Output Examples These examples only show one of potentially many possible outputs. ``` 4 -> 2, 2 6 -> 3, 3 24 -> 5, 19 120 -> 7, 113 1000 -> 3, 997 ``` This is code golf, so shortest answer in each language wins. P.S. If no one finds a test case that has no solution, I'll consider the problem solved by engineer's induction.