Jelly, 89 bytes
ɓḟŒP§iµƇɓḟŒPḊ§iµƇ
Essentially, we go over each element, x
, of the input, L
, and keep it if:
- We remove
x
from the input, call thatL'
- We then get all non-empty subsets of
L'
, and get the sums of each - Finally, if
x
is in these sums, we keep it
If 0
is not considered the sum of the empty list, then +1 byte
How it works
ɓḟŒP§iµƇɓḟŒPḊ§iµƇ - Main link. Takes a list L on the left
ɓ µ - Group the links between ɓ and µ into a dyad f(L, x):
ḟ - Remove x from L, L'
ŒP - Powerset of L'
Ḋ - Remove the leading empty array
§ - Sums of each
i - Index of x, or 0 if not present
Ƈ - For each element, x, of L, keep it if f(L, x) is true