Smith numbers

From Rosetta Code
Smith numbers is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Smith numbers are numbers that the sum of the integers that make up that number is the same as the sum of its prime factors excluding 1. The primes are also excluded as they, naturally, satisfy this condition!

Example: 166 => 2 x 83 => 2 + 8 + 3 = 1 + 6 + 6 = 13.

The task: write a program to find all Smith numbers below 10000.