There are 100 houses in a row on a street. A painter comes and paints every house red. Then, another painter comes and paints every third house (starting with house number 3) blue. Another painter comes and paints every fifth house red (even if it is already red), then another painter paints every seventh house blue, and so forth, alternating between red and blue, until 50 painters have been by. After this is finished, how many houses will be red?
Problem 1090
Official solution
Solution:
House ends up red if and only if the largest odd divisor of is of the form . We have 25 values of ; 13 values of (given by ); 7 values of (); 3 values of (); 2 of the form (for ); 1 of the form ; and 1 of the form . Thus we have a total of red houses.