I have some vectors like this
I would like to get all possible combinations from these vectors that look like this [V1[i],V2[j],V3[k],v4[z]] and that sums up to 3+9+17+5.
I would like to get all combinations with one element from each vector and not get all combination from one vector. For example the following lists are solutions


and many others are.
Any ideas on how to implement this in R? I am a beginner in R and I hope really to get some answers.