optimized further by summing only the differences of teh squared digits when calculating the sum of squares.  no need to loop over digits