2026-11-11

Problem — 2026-11-11

Medium

MediumNumber theory

A school corridor has 100100 lockers numbered 11 to 100100, all closed. Only the students with odd numbers take part: student 11 toggles every locker, student 33 toggles every locker whose number is a multiple of 33, student 55 toggles every multiple of 55, and so on up to student 9999 (each toggle opens a closed locker or closes an open one). After all fifty students have passed, how many lockers are open?

Enter an integer

Show solution
Locker nn is toggled once for each odd divisor of nn, so it ends open exactly when nn has an odd number of odd divisors. Write n=2amn=2^a m with mm odd; the odd divisors of nn are the divisors of mm, and mm has an odd number of divisors exactly when mm is a perfect square. So we count n≤100n\le 100 of the form 2ak22^a k^2 with kk odd: k=1k=1: 1,2,4,8,16,32,641,2,4,8,16,32,64 (77); k=3k=3: 9,18,36,729,18,36,72 (44); k=5k=5: 25,50,10025,50,100 (33); k=7k=7: 49,9849,98 (22); k=9k=9: 8181 (11). Total 7+4+3+2+1=177+4+3+2+1=17.