Interval extend [
sum [^self first + self last * self size / 2]
]
| fn |
fn := [:N |
((3 to: N-1 by: 3) sum + (5 to: N-1 by: 5) sum - (3*5 to: N-1 by: 3*5) sum - (9 to: N-1 by: 9) sum)
].
#(300000 1000000 123456789 52392500521600399351356349174446586983450782741955171098556507898779871325096 81340304960658949829048605343898074748693526364984423822460961155401988944367999613016438883571687846827769443739617707055232638191283495026289615702222182788574658309391713912039023956220354657317299153420226118949128545915432383828558593920321625926429046418867140014450097694225893790336121397039424427669) do: [:N | (N -> (fn value: N)) printNl]
SW50ZXJ2YWwgZXh0ZW5kIFsKCXN1bSBbXnNlbGYgZmlyc3QgKyBzZWxmIGxhc3QgKiBzZWxmIHNpemUgLyAyXQpdCgp8IGZuIHwKCmZuIDo9IFs6TiB8CgkoKDMgdG86IE4tMSBieTogMykgc3VtICsgKDUgdG86IE4tMSBieTogNSkgc3VtIC0gKDMqNSB0bzogTi0xIGJ5OiAzKjUpIHN1bSAtICg5IHRvOiBOLTEgYnk6IDkpIHN1bSkKXS4KCiMoMzAwMDAwIDEwMDAwMDAgMTIzNDU2Nzg5IDUyMzkyNTAwNTIxNjAwMzk5MzUxMzU2MzQ5MTc0NDQ2NTg2OTgzNDUwNzgyNzQxOTU1MTcxMDk4NTU2NTA3ODk4Nzc5ODcxMzI1MDk2IDgxMzQwMzA0OTYwNjU4OTQ5ODI5MDQ4NjA1MzQzODk4MDc0NzQ4NjkzNTI2MzY0OTg0NDIzODIyNDYwOTYxMTU1NDAxOTg4OTQ0MzY3OTk5NjEzMDE2NDM4ODgzNTcxNjg3ODQ2ODI3NzY5NDQzNzM5NjE3NzA3MDU1MjMyNjM4MTkxMjgzNDk1MDI2Mjg5NjE1NzAyMjIyMTgyNzg4NTc0NjU4MzA5MzkxNzEzOTEyMDM5MDIzOTU2MjIwMzU0NjU3MzE3Mjk5MTUzNDIwMjI2MTE4OTQ5MTI4NTQ1OTE1NDMyMzgzODI4NTU4NTkzOTIwMzIxNjI1OTI2NDI5MDQ2NDE4ODY3MTQwMDE0NDUwMDk3Njk0MjI1ODkzNzkwMzM2MTIxMzk3MDM5NDI0NDI3NjY5KSBkbzogWzpOIHwgKE4gLT4gKGZuIHZhbHVlOiBOKSkgcHJpbnRObF0=