Python 3, 69 bytes
lambda n:sum(max(j for j in range(1,i)if i%j<1)for i in range(2,n+1))
Leaky Nun
- 50.6k
- 6
- 115
- 291
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange