I'm not quite sure if there's an algebraic way, but it might help to note that you don't have to check "21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, 315, 336, 357, 378, 399, 420, 441, 462, 483" since the hundreds digit will be smaller than 5. :))
=^._.^=