The number that could be divided up either into bags of 18 marbles or into bags of 42 marbles is 126.
The number that could be divided up either into bags of 18 marbles or into bags of 42 marbles, with no marbles left over in each case, is the lowest common multiple between these two numbers.
By decomposing these numbers as a product of primes, we get:
18 = 2*3*3
42 = 2*3*7
Notice that the first two prime factors are the same, but the third one changes. To get the first common multiple, we need to multiply both numbers by the third factor (the different one) of the other.
We will get:
18*7 = 126
42*3 = 126
Then 126 is the smallest number that can be divided by 18 and 42.
If you want to learn more about lowest common multiple:
https://brainly.com/question/10749076
#SPJ2