Suppose there are 500 pennies in a row... (math problem)?

The pennies are all "heads up"

Now suppose that 500 people line up and ...

Person #1 turns over all the pennies
Person #2 turns over every 2nd penny, starting with penny number 2
Person #3 turns over every 3rd penny, starting with penny number 3
Person #4 turns over every 4th penny, starting with penny number 4
etc..

After everyone has gone through the line, which pennies will show "tails"?

This has to do with the number of factors of numbers.

For example, 6 has 4 factors: 1,2,3,6
Note how neatly the outermost factors (1,6) multiply to give 6, and the inner set (2,3) also.
You will note that almost all numbers, prime or composite, have an even number of factors, hence almost all coins will be turned over an even number of times, which in turn makes them remain "head".

The only exceptions are perfect squares, such as 1,4,9,16,...
For example, 16 has factors:
1,2,4,8,16 (note: 1*16=16,2*8=16,4*4=16).
where 4 is actually twice, but with an odd number of factors.

Therefore, the only coins that remain "tails" up are the perfect squares.

See also a previous discussion on a similar problem:

http://www.jiskha.com/display.cgi?id=1298342653

To solve this math problem, let's analyze the given scenario step by step.

We have 500 pennies in a row, all initially showing "heads up". Let's represent each penny with a number starting from 1 to 500.

Person #1 turns over all the pennies. This means that all pennies will now show "tails up".

Person #2 turns over every 2nd penny, starting with penny number 2. So, penny number 2 will be flipped, changing from "tails" to "heads". Then all the other even-numbered pennies (4, 6, 8, etc.) will be flipped. This means that all pennies with even numbers will now show "heads up".

Person #3 turns over every 3rd penny, starting with penny number 3. Since all even-numbered pennies were already flipped by Person #2 and now show "heads up", Person #3 will only flip the remaining odd-numbered pennies. So, all the pennies with numbers that are multiples of 3 will be flipped, changing their status from "heads" to "tails".

Similarly, Person #4 flips every 4th penny, starting with penny number 4. However, since every penny with a number that is a multiple of 2 has already been flipped by Person #2, Person #4 only needs to flip the remaining pennies whose numbers are multiples of 4. This means that pennies with numbers 4, 8, 12, etc., will be flipped from "heads" to "tails".

We can continue this process for all the people in line, and each person will flip the remaining pennies whose numbers are multiples of their own number.

By the time we reach the last person, Person #500, who flips every 500th penny, the only pennies left to be flipped will be the ones with numbers that are multiples of 500.

To determine which pennies will now show "tails up", we need to find the numbers that have an odd number of factors. Factors are numbers that divide evenly into another number without leaving a remainder. If a number has an odd number of factors, it means that when we reach that number while flipping the pennies, it will end up showing "tails".

So, let's find the numbers that have an odd number of factors among 1 to 500.

The numbers with an odd number of factors are called "perfect squares". These are the numbers whose square roots are whole numbers. For example, the square root of 4 is 2, so 4 is a perfect square.

In the range from 1 to 500, there are 22 perfect squares (1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484).

Therefore, the pennies with numbers 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, and 484 will show "tails" after everyone has gone through the line.

So, these are the pennies that will be flipped to "tails" at the end of the process.