> lst =[x for x in xrange(1,10^4+1) if float((sigma(x)+28)/x) == int((sigma(x)+28)/x)]; len(lst) Richard: I forgot to force floating point division above, but I double-checked that, and I still get the same result as you. -Don