Wolfram Mathworld (http://mathworld.wolfram.com/SumofPrimeFactors.html) describes a function sopfr(n), the sum of prime factors, which I currently need. This code doesn't work when I insert it in Mathematica. I want a version of this code that does not do repetition. So, e.g., the output for $20=2^25$ would be $2+5$ and not $2+2+5$.
Given $n$, and $j\le n,$ I am requesting a code for the that gives output $$\sum_{p\le n, p\,\text{prime factor of } j}p\,.$$
when the input is $n,j$. So here I do not get the entire sum of prime factors, only those bounded by some prescribed $n$.