a=->n,d=1{d<67?a[n,d+=2]-(2**d%d==2?d*(a[n/=d,d]+n*~n/2):0):0}p a[10**5],a[10**9]
Standard input is empty
3712013581 370375739387672112
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!