1) A school has 1-- closed lockers. Larry comes into the school and "toggles" every second locker, then Fred toggles every 3rd, Bob every 4th, etc, up to Zoe who toggles every 100th locker. After all this"toggling" how many lockers are open?

2) If you take any valid time from a 12 hour clock, what is the maximum sum you can obtain by adding the digits? (Eg. For 7:14, the sum is 7+1+4=12)

THANKS!

2)

Isn't it 12:59?

yah thanks!

i am having a hard time with number one. i know i could sit down and take a long time to do it...but i was wondering if their was a formula to it, or a quicker way to do it...

make a list of lockers up to whatever you feel like

put c for closed under each one
starting with 2,4,6,8,...switch the c to o, for open
starting with 3,6,9,12,.. switch to c's to o's, and the o's to c's
starting with 4,8,12,16,... switch the c's to o's, and the o's to c's
continue....

you will notice that only the perfect square numbers will be c's

so which are the perfect squares ?
1,4,9,16,25,36,49,64,81,and 100

somebody actually spent time and effort to create an applet that shows this pattern.
only in this problem the first student starts by switching all the lockers, so in their case all the lockers are initially open.
(For some reason on my computer it seems to jump to the final stage almost right away)
(Broken Link Removed)

I don't know how to do number 1 since it doesn't say how many lockers there are initially. It says "1--," but not sure if that should be something else.

Question 1

This has to do with the number of factor of an integer. An even number of factors will cause the door to be toggled (open/close) an even number of times, therefore they will remain closed.

For example, a prime number has two factors:
7=(1,7), 13=(1,13).

Almost all other numbers have an even number of factors:
24=(1,2,3,4,6,8,12,24),
88=(1,2,4,8,11,22,44,88)

You will notice that the product of the first and the last factors give the number itself.

Since the factors are always different, there is an even number of them... except in the case of perfect squares, where the middle factors are identical, so we count them only once, and the locker will be visited an odd number of times, leaving them open.

Examples:
9=(1,3,9)
81=(1,3,9,27,81)
100=(1,2,5,10,20,50,100), etc.

Question 2:
If we were to add all digits separately, I would suggest 9:59 which gives a sum of 23 as the highest sum.

MathMate is obviously correct. 9:59 yields a greater sum than 12:59.

1) To figure out how many lockers are open after all the "toggling", we need to understand the pattern. Initially, all the lockers are closed. As each person toggles the lockers, they either open or close them.

Let's break down the problem step by step:

- Larry toggles every second locker initially, so all odd-numbered lockers are opened.
- Fred toggles every third locker, starting from the second locker. This means he closes any locker that was opened by Larry (odd-numbered lockers), and opens any closed locker (which is now at an even position). This process toggles the lockers at positions that are multiples of 3.
- Bob toggles every fourth locker, starting from the fourth locker. This means he closes any locker that was opened by Larry or Fred, and opens any closed locker (which is now at an odd position). This process toggles the lockers at positions that are multiples of 4.
- This process continues until Zoe toggles every 100th locker.

By the end, any locker that is toggled an odd number of times will be open, and any locker that is toggled an even number of times will be closed.

To count how many lockers are open, we need to find the lockers that are toggled an odd number of times.

The key observation is that a locker will be toggled k times if it has k factors (including 1 and itself). For example, locker 12 will be toggled four times (by 1, 2, 3, and 12) because it has four factors (1, 2, 3, and 12).

Now, let's calculate the number of factors for each locker:

Locker 1: factors -> 1. Toggled once.
Locker 2: factors -> 1, 2. Toggled twice.
Locker 3: factors -> 1, 3. Toggled twice.
Locker 4: factors -> 1, 2, 4. Toggled three times.
Locker 5: factors -> 1, 5. Toggled twice.
Locker 6: factors -> 1, 2, 3, 6. Toggled four times.

Notice the pattern that the number of times a locker is toggled is determined by its factors. If a locker has an odd number of factors, it will be toggled an odd number of times and remain open. Otherwise, it will be toggled an even number of times and be closed.

From our observation, we know that a locker has an odd number of factors if and only if it is a perfect square. For example, 1 (1 * 1), 4 (2 * 2), 9 (3 * 3), etc., are perfect squares.

So, to determine the number of open lockers, we need to calculate how many perfect squares are there between 1 and 100 (inclusive).

There are ten perfect squares between 1 and 100:
1, 4, 9, 16, 25, 36, 49, 64, 81, 100.

Therefore, there are 10 open lockers after all the "toggling".

2) To find the maximum sum of the digits in any valid time from a 12-hour clock, we need to consider all the possible digit combinations.

The earliest valid time on a 12-hour clock is 00:00, and the latest is 12:59. Let's analyze the possible digit combinations for each part of the time.

For the hour part (00-12):
- There are two digits for the first position (possible values: 0, 1).
- For the second position, it can take any value from 0 to 9.

So, for the hour part, the maximum sum of the digits would be 1 + 9 = 10, obtained when the hour is 19.

For the minute part (00-59):
- The first position can take any value from 0 to 5.
- The second position can take any value from 0 to 9.

So, for the minute part, the maximum sum of the digits would be 5 + 9 = 14, obtained when the minute is 59.

Therefore, combining the maximum sums of the digits for the hour and minute parts, the overall maximum sum of the digits would be 10 + 14 = 24, obtained when the time is 19:59.

So, the maximum sum of the digits for any valid time on a 12-hour clock is 24.

Hope this helps! Let me know if you have any further questions.