Jure put black marbles into a sequence. Then he replaced every third marble in the sequence by a red marble. After that he replaced every fifth marble in the sequence by a yellow marble. At the end, he replaced every seventh black marble in the sequence by a blue marble. How many black marbles were there in the sequence at the end?
, 2012
Solution
Number the marbles with numbers from to in the order they stand in the sequence. Let us first calculate how many black marbles were there in the sequence after the second step. Jure replaced exactly those black marbles (by red or yellow ones) whose number was divisible by or . Because , exactly black marbles were replaced. Right after the second step there were thus black marbles in the sequence. Because , Jure replaced black marbles (by blue ones) in the third step. At the end, there were black marbles in the sequence.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.