Problem 56190. Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n.
Fun note: technically it cannot be guaranteed that such primes exist for any n. However, although Goldbach's Conjecture has not been formally proven, it has been verified for all n well beyond any you'll face in this problem.
Solution Stats
Problem Comments
-
3 Comments
Gerardo Domínguez Ramírez
on 28 Oct 2022
Nice problem!
Asif Newaz
on 11 Apr 2023
you should put some straight-forward test cases for easy debugging
Dyuman Joshi
on 12 Apr 2023
Test cases have been added to the problem.
Solution Comments
Show commentsProblem Recent Solvers156
Suggested Problems
-
Create an n-by-n null matrix and fill with ones certain positions
520 Solvers
-
3810 Solvers
-
1225 Solvers
-
333 Solvers
-
174 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!