# Python, 45 bytes lambda k:sum(i for i in range(1,1+k)if k%i<1) Thanks to Stephen, save 1 byte.