#Java 8, 78 74 72 bytes
Java 8, 78 74 72 bytes
n->{int r=0,j;for(;n>1;n--)for(j=n;j-->1;)if(n%j<1){r+=j;j=0;}return r;}
Port of @CarlosAlejo's C# answer.
Old answer (78 bytes):
n->{int r=0,i=1,j,k;for(;++i<=n;r+=k)for(j=1,k=1;++j<i;k=i%j<1?j:k);return r;}
Explanation (of old answer):
n->{ // Method with integer parameter and integer return-type
int r=0, // Result-integers
i=1,j,k; // Some temp integers
for(;++i<=n; // Loop (1) from 2 to `n` (inclusive)
r+=k) // And add `k` to the result after every iteration
for(j=1,k=1;++j<i; // Inner loop (2) from `2` to `i` (exclusive)
k=i%j<1?j:k // If `i` is dividable by `j`, replace `k` with `j`
); // End of inner loop (2)
// End of loop (2) (implicit / single-line body)
return r; // Return result-integer
} // End of method