I put a number of pennies, nickels, dimes, and quarters (at least one of each) on the table and said, "This is my offer.   It is a square deal, because the total amount in cents is equal to the square of the number of coins."

The unexpected reply was, "If you add seven more quarters to the offer, the value will still be the square of the number of coins, and I will accept it."

How many coins of each denomination did the original offer include?

Solution to the Problem:

The original offer was one penny, three nickels, four dimes, and one quarter.

In the original, the coins added up to 81 cents which is the square of 9 coins.
In the counter-offer, the coins added up to 256 cents which is the square of 16 coins.

Chad Fore sent in the following solution:
The clue is in the line, "If you add seven more quarters to the offer, the value will still be the square of the number of coins, and I will accept it."

That gives you the equation:

(x + 7)^2 - x^2 = 175 (the value of 7 quarters in cents)

Solving for x, you get x = 9, so the original number of coins is 9 and their value is 81 cents.

So there was 1 quarter, 4 dimes, 3 nickels, and 1 penny.



Michael Reilly sent in the following solutions:

Given:
-- p pennies, n nickels, d dimes, and q quarters
-- p, n, d, and q are each at least 1
-- p + 5n + 10d + 25q = (p + n + d + q)^2
-- p + 5n + 10d + 25(q + 7) = (p + n + d + q + 7)^2

Distributing on the left side of the second equation, we get:
p + 5n + 10d + 25q + 175 = (p + n + d + q + 7)^2

We can now substitute directly from the first equation:

(p + n + d + q)^2 + 175 = (p + n + d + q + 7)^2

Let x = p + n + d + q. Now we have:

x^2 + 175 = (x + 7)^2
x^2 + 175 = x^2 + 14x + 49
14x = 126
x = 9

So, we have 9 total coins: p + n + d + q = 9
The first given equation becomes: p + 5n + 10d + 25q = 81           (9^2 = 81)
The second given equation becomes: p + 5n + 10d + 25(q + 7) = 256           (9 + 7 = 16, 16^2 = 256)

We have at least one of each coin, so we can rewrite each variable as p = 1 + p0, etc. such that:

p0 + n0 + d0 + q0 = 5 where p0, n0, d0, and q0 are each at least 0

Also, we know that p0 + 5n0 + 10d0 + 25q0 + (1 + 5 + 10 + 25) = (p0 + n0 + d0 + q0 + 4)^2

Let's get an idea of how many possible solutions there are given what we know:

p0 + 5n0 + 10d0 + 25q0 + 41 is a perfect square. The lower bound (5 pennies) is 46 and the upper bound (5 quarters) is 166. So we are limited to six perfect squares between 46 and 166: 49, 64, 81, 100, 121, 144

That is: p0 + 5n0 + 10d0 + 25q0 + 41 is an element of the set {49, 64, 81, 100, 121, 144}

Thus we can say p0 + 5n0 + 10d0 + 25q0 is an element of the set {8, 23, 40, 59, 80, 103}

We can eliminate 8 as an option because it would take either 4 coins (1 nickel and 3 pennies) or 8 coins (8 pennies) to reach it
23 can be reached one way with 5 coins (2 dimes and 3 pennies)
40 can be reached one way with 5 coins (3 dimes and 2 nickels)
We can eliminate 59 as an option because it will take at least 7 coins to reach it (2 quarters, 1 nickel, and 4 pennies)
80 can be reached one way with 5 coins (2 quarters and 3 dimes)
We can eliminate 103 as an option since it would take a minimum of 7 coins to reach it (4 quarters and 3 pennies)

Now we know p0 + 5n0 + 10d0 + 25q0 is an element of the set {23, 40, 80}

We have three potential solutions for (p0, n0, d0, q0):
1: (3, 0, 2, 0)
2: (0, 2, 3, 0)
3: (0, 0, 3, 2)

Thus we have three potential solutions for (p, n, d, q)
1: (4, 1, 3, 1)
2: (1, 3, 4, 1)
3: (1, 1, 4, 3)

Let us refer back to our original constraints to test the solutions:

p + 5n + 10d + 25q = 81
1: 4 + 5(1) + 10(3) + 25(1) = 4 + 5 + 30 + 25 = 64 <> 81
Therefore, (4, 1, 3, 1) is incorrect
2: 1 + 5(3) + 10(4) + 25(1) = 1 + 15 + 40 + 25 = 81
Looks like we've found our solution! Let's check option 3 just to be safe...
3: 1 + 5(1) + 10(4) + 3(25) = 1 + 5 + 40 + 75 = 121 <> 81
Therefore, (1, 1, 4, 3) is incorrect

Before we lock in our final answer, we verify that our solution satisfies each constraint:
-- p, n, d, and q are each at least 1
CHECK!
-- p + 5n + 10d + 25q = 81
CHECK! (see previous step)
-- p + 5n + 10d + 25(q + 7) = 256
1 + 5(3) + 10(4) + 25(1 + 7) = 1 + 15 + 40 + 200 = 256
CHECK!

Thus, the original offer included 1 penny, 3 nickels, 4 dimes, and 1 quarter.
// QED

After completing the above solution, I realized that I could have found the solution in fewer steps, so:

ALTERNATE SOLUTION:
Given:
-- p pennies, n nickels, d dimes, and q quarters
-- p, n, d, and q are each at least 1
-- p + 5n + 10d + 25q = (p + n + d + q)^2
-- p + 5n + 10d + 25(q + 7) = (p + n + d + q + 7)^2

Distributing on the left side of the second equation, we get:
p + 5n + 10d + 25q + 175 = (p + n + d + q + 7)^2

We can now substitute directly from the first equation:

(p + n + d + q)^2 + 175 = (p + n + d + q + 7)^2

Let x = p + n + d + q. Now we have:

x^2 + 175 = (x + 7)^2
x^2 + 175 = x^2 + 14x + 49
14x = 126
x = 9
So, we have 9 total coins: p + n + d + q = 9
The first given equation becomes: p + 5n + 10d + 25q = 81           (9^2 = 81)
The second given equation becomes: p + 5n + 10d + 25(q + 7) = 256           (9 + 7 = 16, 16^2 = 256)
The second given equation now reduces to the first given equation, so we've extracted as much information as we can from it and can now disregard it.

Since the value of the initial offer is 81, there must be 1 or 6 pennies (there cannot be 11, 16, etc. because there are only 9 coins). If there are 6 pennies, there must be 3 quarters, which gives us 81 cents, but we know there must be at least one nickel and one dime, so there cannot be 6 pennies. Thus, there is 1 penny.

The first given equation now reduces to: 5n + 10d + 25q = 80
And we know that n + d + q = 8

There cannot be 3 quarters because that would require only 4 coins and 0 dimes (3 quarters and 1 nickel).
There cannot be 2 quarters because that would require 0 dimes (2 quarters and 6 nickels).
There must be 1 quarter.

Now, we need to reach 55 cents with 7 nickels and dimes, which we can do with 3 nickels and 4 dimes.

Thus, the solution is 1 penny, 3 nickels, 4 dimes, and 1 quarter.
// QED


Correctly solved by:

1. James Alarie Flint, Michigan
2. Austin Houskeeper Mountain View High School,
Mountain View, Wyoming
3. Ryan Woody Mountain View High School,
Mountain View, Wyoming
4. Brooks Garris Lake View High School,
Lake View, South Carolina
5. Kam Dellinger Mountain View High School,
Mountain View, Wyoming
5. Chad Fore Gate City, Virginia
6. Isaac Kampman Mountain View High School,
Mountain View, Wyoming
7. Caleb Flake Mountain View High School,
Mountain View, Wyoming
8. Cheyenne Dunn Mountain View High School,
Mountain View, Wyoming
9. Alexis Stoddard Mountain View High School,
Mountain View, Wyoming
10. Michael Reilly Silver Spring, Maryland