147
291
141
144
We try the smallest in the list, 141 by dividing 141 by 4 to see if it
leaves the remainder 3:
35
4)141
12
21
20
1 <-- no, it doesn't leave remainder 3, it leaves remainder 1, So the
answer is not 141.
So we try the next higher one in the list, 144 by dividing 144 by 4 to see if it
leaves the remainder 3.
36
4)144
12
24
24
0 <-- no, it doesn't leave remainder 3, it leaves remainder 0, So the
answer is not 144.
So we try the next higher one in the list, 147 by dividing 147 by 4 to see if it
leaves the remainder 3.
36
4)147
12
27
24
3 <-- hey, right! It leaves a remainder of 3, so the answer is 147.
No need to try 291.
Edwin