On Friday I set this puzzle. If you haven’t tried to solve it, have a go now. For everyone else, the answer is after the break.

You and a friend have a pile of 15 pennies and decide to play a little game. You will each take turns removing pennies from the pile. On each turn you or your friend can take 1, 2, or 3 pennies. The loser is the person who takes the last penny. You are allowed to go first. How many pennies should you take?

You want to leave your friend 5 pennies. That way, no matter how many pennies they take, you can leave the final penny to them. Similarly, it is good to leave them with 9 pennies because no matter what your friend does, they must give you the opportunity to leave them with 5. Similarly, leaving your friend with 13 pennies will ensure that you can reach 9, then 5. So, on your first turn, take 2 pennies.

I have produced an ebook containing 101 of the previous Friday Puzzles! It is called

**PUZZLED** and is available for the

**Kindle **(UK

here and USA

here) and on the

**iBookstore** (UK

here in the USA

here). You can try 101 of the puzzles for free

here.

### Like this:

Like Loading...

*Related*

I choose 2 Pennies because it was an east way to draw out the opponent’s intentions. That is very smart.

I was barking up completely the wrong tree on this one.

I got the official answer!

can someone post the formula for this please?

The idea is that you can make sure 4 pennies are removed every round. If he takes 1, you take 3, he takes 2, you take 2, he takes 3, you take 1.

So if 4 pennies go every round, then his first pick needs to be at 4+4+4+1, that is 13.

N-(5+4(mod(N/4)-1))

Sorry. My formula should read N-1-4(mod(N/4). N=15, result = 15-1-4*3 = 2.

You always want to leave your opponent with one more than a multiple of four, in this case 13 (3*4)+1.

This is because for each round you can always guarantee the number of coins will be reduced by four no matter what your opponent does e.g. they take two, you take two; they take one, you take three. Four is the only number this statement is true for.

Me = M

You = Y

Starting from reverse;

Step 5:

Y = 1

—————————–

Step 4: 3 Options exist

M = 3, 2, 1

Y = 1, 2, 3

—————————–

Step 3 and Step 2 are a repeat of Step 4.

Notice the number of pennies always adds up to 4.

Thus adding all the pennies so far in reverse = 1 + 4 + 4 + 4 = 13

13 from 15 = 2

—————————–

Step 1:

M = 2

Let’s solve this by working backwards, and then extrapolate to solve the general case.

On my turn:

If 1 object remains, I lose.

If 2, 3, or 4 objects, take 1, 2, or 3 objects (respectively) to win.

If 5 objects, I lose.

If 6, 7, or 8 objects, take 1, 2, or 3 to win on my next move.

If 9 objects, I lose.

If 10, 11, or 12 objects, take 1, 2, or 3 to win on my second move.

If 13 objects, I lose.

If 14 or 15 objects, take 1 or 2 to win on my third move.

Thus my first move should be to take 2 objects. Then, when the other player takes p objects, I take 4 – p objects on my turn so that the sum of our turns is constant.

To extrapolate, I lose if there are 4n + 1 objects remaining on my turn (for any n ∈ {0, 1, 2, …} where the complete game will consist of 2(n + 1) turns), and I can win in any other case. So on our first turn, we want to remove enough objects so that we leave 4n + 1 objects for our competitor.

Why 4n + 1? Because 1 is how many objects we want to leave for our opponent on our last move so that they are forced to take it, and 4n because you want to ensure that no matter how many objects your opponent takes in their move, you can find a number to remove that makes the sum of the two plays constant.

Okay, the general case now.

For an initial number of objects N where players take anywhere from 1 to j objects per turn, for your first move you should take k object(s), where k satisfies N – k = n(j + 1) + 1 for some n ∈ {0, 1, 2, …} such that k ∈ {1, 2, …, j}; that is, you should take (N – n(j + 1) – 1) object(s). (Note that you will not be able to find such k if N happens to already equal one more than an integer multiple of (j + 1), in which case you can either generously offer your opponent the first move, or hope that your opponent will eventually leave a number of objects not satisfying this condition on a subsequent turn.) Then, when your opponent takes p object(s), you take q object(s) such that p + q = j + 1; that is, you take (j + 1 – p) object(s). The total game will consist of 2(n + 1) turns: You will play n + 1 turns, and your opponent will play n + 1 turns.

A simple way to say this is that it’s always possible for what you and your opponent take to add up to 4. If they take 1, you take 3. If they take 2, you take 2. If they take 3, you take 1. You can only get a consistent number with 4.

So, if you leave them with 5, you can assure that on their next turn, there will only be one left and they will lose. Similarly, if you leave them with 9, you can assure that on their next turn, they will be left with 5 1, 5, 9, 13, etc., are key numbers that if you leave your opponent that number, you can always lead them down the progression to 1.

Now that’s my kind of explanation.

Oldie but goody.

common formula for any number of coins and any number of coins to take for each round:

let N be number of coins

let M be maximum number of coins you may take for each round

let T be the number of coins you should take first

let B be the number of coins your opponent took in the current round

let C be the number of coins you should take for current round

T = MOD(N,M+1)-1

C = M-B+1

If you were writing a program then the computer would not care how you came to your solution but as we are not computers, well most of us, then a lot more explanation would go a long way to help us understand your solution and indeed if it even works. A few REMs in there would be useful.

In the math’s world it’s called a general formula. Are you a computer programmer ?

Sorry Steve, I am more a computer programmer than a mathematician, and also, English is not my native language.

So here some explanation:

In order to get to winning positions, you have to equalize the take from your opponent. If lets say you are allowed to take up to 3, then magic equalization number is 4 (+1). So if the other takes 3, you have to take 1, if the other takes 2, you also have to take 2, if the other takes 1, you have to take 3.

This makes up the M+1 part in my formula and also the C=M-B+1

A winning position is 1, the next winning position is 5, the next is 9, the next 13 and so on. So you have to divide the number of coins by 4 (generally speaking divided by M+1), and the remainder determines the offset of the winning positions. Since winning position is 1, you have to subtract 1 in the formula.

Thus makes up MOD(N,M+1)-1

Sorry, this is the best how I can explain, for me the general formula is logical. (I am bad at explanations)

Best if you enter these formulas into an Excel spreadsheet, and you will see, that they’

ll work.

Your solution makes so much “cents”! Thx!…& keep ’em coming!

nice

I find these explanations just fine, but what happens if your opponent goes first?

Then the opponent will win, if he is able to reach a winning position.

If your opponent doesn’t know the winning strategy, then it’s very likely they will make a mistake that allows you to win. If they take 3 with their first move, leaving you with 12, then you take 3. So long as you can leave them with 13, 9, or 5 at some point, you will win.

Reblogged this on STORY 2 SUCCESS BLOG.

I didn’t know this puzzle before, but I managed to work it out and realised that it’s an easier sequence of 15, 13, 9, 5, 1 rather than zillions of possible combinations going down to 1.

So I worked out that someone can always win if they start by taking 2.

Even better, if you are an adult (and know the trick) you can play the game against a child (assuming the child doesn’t know the trick), and – even if you let the child make the first move – you have a 2/3 chance of being able to win. Even if the child starts by taking 2, you can probably manipulate the situation to let the child win, if necessary, and without it being too obvious.

I don’t no how use On Jul 1, 2013 1:00 PM, “Richard Wiseman” wrote: > > Richard Wiseman posted: “On Friday I set this puzzle. If you haven’t tried to solve it, have a go now. For everyone else, the answer is after the break. You and a friend have a pile of 15 pennies and decide to play a little game. You will each take turns removing pennies f” >

Heya i am for the primary time here. I came across this board and I in finding

It really helpful & it helped me out much. I’m hoping to give something again and aid others like you helped me.