Two remainder conditions
Intersect two finite remainder lists to find every solution from 1 to 30.
The video could not load. Check your connection and try again, or download it directly.
Download video
Open Chinese transcript
- 一个数在一到三十之间,除以四余一,同时除以六余三。我们先列第一条条件的候选。
- 除以四余一的数是:一、五、九、十三、十七、二十一、二十五、二十九。
- 再把这些数逐个除以六,检查余数是不是三。
- 九除以六余三,二十一除以六也余三;其他候选都不符合。
- 所以一到三十中只有九和二十一。两数放回两条余数条件都通过。
- 同时满足两种循环,就是取两张候选表的交集;只满足其中一条还不能保留。
Sources for this explanation
Logical thinking
List numbers with remainder 1 on division by 4, then filter by remainder 3 on division by 6.
Worked example
A number is from 1 to 30, leaves remainder 1 when divided by 4, and remainder 3 when divided by 6. What numbers work?
The first list is 1,5,9,13,17,21,25,29. Filtering by the second condition leaves 9 and 21.
Try one question
The two solutions are 9 and 21.