Sum multiples of 3 and 5: Difference between revisions
→{{header|Maxima}}
Line 1,980:
=={{header|Maxima}}==
{{incorrect|Maxima|output should be 233168}}
As the wrong result matched with powershell, I suspect there is a missing -1 here somewhere.
<lang Maxima>sumi(n, incr):= block([kmax: quotient(n, incr)],
''(ev(sum(incr*k, k, 1, kmax), simpsum)));
|