You know the drill...
Given two integers x and n, with , find the sum of all positive integers below x, that are multiples of any of the integers from 2 up to n.
For example, for and , the sum of the multiples of 2, 3, 4 or 5 is:
.

Solution Stats

16 Solutions

4 Solvers

Last Solution submitted on Jul 31, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers4

Suggested Problems

More from this Author116

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!