Is this a Smith number? Challenge description

A Smith number is a composite number whose sum of digits is equal to the sum of sums of digits of its prime factors. Given an integer N, determine if it's a Smith number or not.

The first few Smith numbers are 4, 22, 27, 58, 85, 94, 121, 166, 202, 265, 274, 319, 346, 355, 378, 382, 391, 438 (sequence A006753 in OEIS).

Sample input / output

18: False (sum of digits: 1 + 8 = 9; factors: 2, 3, 3; sum of digits of factors: 2 + 3 + 3 = 8)
22: True
13: False (meets the digit requirement, but is prime)
666: True (sum of digits: 6 + 6 + 6 = 18; factors: 2, 3, 3, 37; sum of digits of factors: 2 + 3 + 3 + 3 + 7 = 18)
-265: False (negative numbers can't be composite)
0: False (not composite)
1: False (not composite)
4937775: True


Notes


Your code can be a function (method) or a full working program,
Instead of words like True and False, you can use any truthy and falsy values, as long as it's clear what they are,
This is a code-golf challenge, so make your code as short as possible!
Python 2, 122 115 110 106 bytes



n=m=input()
s=0
for d in range(2,n):
 while n%d&lt;1:n/=d;s+=sum(map(int,`d`))
print n&lt;m&gt;s==sum(map(int,`m`))


Saved 4 bytes thanks to Dennis

Try it on ideone.com

Explanation

Reads a number on stdin and outputs True if the number is a Smith number or False if it is not.

n=m=input()                  # stores the number to be checked in n and in m
s=0                          # initializes s, the sum of the sums of digits of prime factors, to 0
for d in range(2,n):         # checks all numbers from 2 to n for prime factors
 while n%d&lt;1:                # while n is divisible by d
                             #   (to include the same prime factor more than once)
  n/=d                       # divide n by d
  s+=sum(map(int,`d`))       # add the sum of the digits of d to s
print                        # print the result: "True" if and only if
      n&lt;m                    #   n was divided at least once, i.e. n is not prime
      &gt;                      #   and m&gt;s (always true) and
      s==sum(map(int,`m`))   #   s is equal to the sum of digits of m (the input)