I have a number and i want to find out if i can get that number by adding 7 prime numbers.How can i find that out?
Example
Number:14
Answer:2 2 2 2 2 2 2
I have a number and i want to find out if i can get that number by adding 7 prime numbers.How can i find that out?
Example
Number:14
Answer:2 2 2 2 2 2 2
This is a consequence of the weak Goldbach conjecture, proved in 2013, that any odd $n \geq 7$ is the sum of three primes. Then any $n \geq 15$ is the sum of seven primes, namely the three primes that add up to $n-8$ and $2+2+2+2$ (if $n$ is odd), or the three primes that add up to $n-9$ and $2+2+2+3$ (if $n$ is even). The case $14 = 7 \times 2$ can be handled separately, so we have the result for $n \geq 14$.
By the weak Goldbach conjecture, every odd number greater than $5$ can be expressed as the sum of three primes. So we have $n=p+q+r$. Now consider $N=n-2-2-2-2$ for $n\ge 9$. Then $N=2+2+2+2+p+q+r$ is the sum of $7$ primes. So every odd number $N\ge 14$ is the sum of seven primes. For the even case, use $N=n-2-2-2-3$.
For n sufficiently large $n>=100$ probably less you can substract $2$ and $3$ conveniently to form odd number. Then applying the Weak Golbach Conjecture (which as far as I remember it was proved recently) it is always possible to decompose an odd number into the sum of three prime numbers.
When n is small you can do a brute force algorithm to find every decomposition and check whether it is valid or not.