# Four Mathematicians, Four Poker Hands and Four Clues

These four mathematician friends play poker every Saturday night. They always have a twist for the very last hand, just for fun.

This Saturday the twist was “Factorial Clues”. The rule for the last hand was that every player must give a clue about his hand that relates to factorials. They played 5 card poker with a single deck.

Cards were dealt: Five each.

Here were the clues.

John: “I have no face cards. All my five cards are factorials. Their (five cards) multiplication is also a factorial number.”

Jose: “No face cards. Factorial of the first card a perfect square. Sum of the factorial of the first card and the factorial of the second card is also a perfect square. Sum of the factorial of the first card and the factorial of the second card and the factorial of the third card is also a perfect square. Sum of the factorial of the first card and the factorial of the second card and the factorial of the third card and the factorial of the fourth card is also a perfect square. Sum of the factorial of the first card and the factorial of the second card and the factorial of the third card and the factorial of the fourth card and the factorial of the fifth card is also a perfect square.”

Ari: “No face cards. Sum of the factorials of each of my five cards is a 3 digit perfect cube.”

Neal: “No face cards. None of my cards are prime numbers. My five cards add up to a number whose reverse is a factorial.”

It’s time to bid.

If they are all smart logical players, how should the bidding go? Specifically, what should Ari do?

Note: Ace is not a face card. It is 1 only. Please assume everything was legal.

• is an ace a face card? or a 1? Apr 26, 2021 at 11:56
• It is 1 @SteveV. Thanks. Edited in.
– DrD
Apr 26, 2021 at 12:00
• I like to imagine how the other 3 are looking at Jose when that clue finally comes to an end "Do... you think you can write that down for us?" Apr 26, 2021 at 12:04
• Never mind didn't notice it was just a very lengthy way of saying that Apr 26, 2021 at 12:11
• When Jose talks about "first card", "second card", etc., is the order arbitrary? (That seems the most obvious interpretation, but I don't know anything about poker and maybe e.g. it's standard for "first" to mean "highest", or to put the suits in a particular order, or something.) Apr 26, 2021 at 12:48

## 2 Answers

John:

A, A, 2, 2, 6 (1 x 1 x 2 x 2 x 6 = 24)

Jose (first try):

A, 4, 4, 5, 5. Sums: 1, 25, 49, 169, 289 (1 + 24 + 24 + 120 + 120)

Ari's hand sums to one of the following 3-digit perfect cubes:

125, 216, 343, 512, 729

We can:

Reach 729 quite simply with 6! (720) + 3! (6) + 1! (1) + 1! (1) + 1! (1). However, that would mean we have another 3 Aces for a total of 6. For now I am going to assume no one is cheating and use this information as a limiting factor. We can't reach 729 any other way so we are down to 4 possible sums and the numbers can't be higher than 5.

Available cards:

A, 2, 2, all 3s, 4, 4, 5, 5

We know that:

At least one of the numbers is a 5, because we can't reach 125 (the lowest possibility) any other way. This rules out 125, so we are left with only three possible sums. ​Because we only have 2 4s left, we can only make 48 with them and get a max of 6 from each of the remaining cards. This makes reaching the other numbers impossible. If we have 1 Five, we would need all of the 4s to make 216 (and we only have 2 4s left. If we have 2 Fives, we would need to make 103 with the remaining cards and we just can't. We don't have more than 2 5s, so yeah... Ari's hand should be impossible and it looks like someone is cheating.

So either:

Ari should claim someone is cheating (Question now clarifies that the cards are legal)

or

I don't see any possible alternative for John's hand, so we have to find an alternative for Jose's hand such that it has no 4s, allowing us to achieve 216 with 4, 4, 4, 4, 5.

Another possible hand of Jose:

A, 5, 6, 5, 6. Sums: 1, 121, 841, 961, 1681 (1 + 120 + 720 + 120 + 720)

So Ari's hand can be:

4, 4, 4, 4, 5 (24 + 24 + 24 + 24 + 120 = 216)

Finally let's look at Neal's hand:

24 is the only factorial with more than 1 digit, which doesn't end with 0, so Neal's cards must add up to 42.

The cards can only include:

1, 4, 6, 8, 9, or 10

We need at least 4 of a kind to beat Ari (since we have no prime numbers or face cards for a flush), so we need only consider the other possibilities with 4 of the same.

Unfortunately, we find:

9,9,9,9,6

Meaning Ari should:

Stay in at least until there are just two players, seeing how confidently Neal plays up til that point. I can't really say more than this based on the reasoning here, it depends on Ari's playstyle.

I suppose the final step here would be to say that:

Based on probability, if Ari just has to decide whether they have a better hand than the opponent based on these details and we ignore all the other information-gathering of Poker, then Ari should bet that they have the better hand. There are five possibilities that result in a win for Neal: four versions of 8-8-8-8-10 and one version of 9-9-9-9-6 (since there is only one 6 left). However there are many more possibilities that result in a win for Ari, including all the variants of 8-8-8-9-9 (I believe there's 24 combinations of cards that lead to this alone, (4x variants of 8s) x (6 x variants of 9s)). But there's also 8,8,10,10,6, and others (I don't want to go through them all, this is enough to establish that Ari winning is more likely).

• ROT 13(Terng nanylfvf. Ohg pna lbh trg gb Wbfr'f pneqf ol abg sbyybjvat n cnegvphyne beqre. Yvxr vafgrnq bq NOOPP, fnl NOPOP RGP?
– DrD
Apr 26, 2021 at 13:54
• @DrD ROT13(Abg fher V haqrefgnaq, vfa'g "NOPOP" rknpgyl jung V qvq jvgu gur frpbaq Wbfr nggrzcg?) Apr 26, 2021 at 13:59
• YES. I missed that. My bad
– DrD
Apr 26, 2021 at 14:02
• Lbh pna trg gb 42 ol guerr 8f naq gjb 9f nf jryy nf sbhe 8f naq n 10. Hence the dilemma for Ari?
– DrD
Apr 26, 2021 at 14:05
• @DrD Ari are going to play Check-Call/Check-Fold depending on the game meta and betting rules. So the answer is "Ari checks" :) Apr 26, 2021 at 15:11

Possibly wrong answer because I don't get a clear-cut answer to the final question (but I've checked my working and haven't found any errors):

[I have used a computer, but only as a slightly more convenient pocket calculator.]

John: “I have no face cards. All my five cards are factorials. Their (five cards) multiplication is also a factorial number.”

Factorials are 1, 2, 6. Product is factorial of <= 4 because no factor of 5. Product could be 1 if all are 1, but there are only four aces. Product could be 2 if John has AAAA2, or 6 if he has AAAA3, or 24 if he has AA223. I think that's all the options.

Jose: “No face cards. Factorial of the first card a perfect square.

Only perfect-square factorial is 1, so first card is an ace. Note that this means John doesn't have AAAA2 or AAAA3. So John has AA223.

Sum of the factorial of the first card and the factorial of the second card is also a perfect square.

Perfect-square-minus-1 factorials (up to 10!) are 4!=24, 5!=120, 7!=5040. So Jose has A4..., A5..., A7...

Sum of the factorial of the first card and the factorial of the second card and the factorial of the third card is also a perfect square.

Sum of first two cards' factorials is 25, 121, or 5041. Factorials up to 10! that make a square on adding one of these: 25+4!=49, 121+6!=841. So Jose has A44.. or A56..

Sum of the factorial of the first card and the factorial of the second card and the factorial of the third card and the factorial of the fourth card is also a perfect square.

Sum of first three cards' factorials is 49 or 841. Factorials up to 10! that make a square on adding one of these: amusingly, 5! works for both. 49+5!=13^2 and 841+5!=31^2. So Jose has A445 or A565.

Sum of the factorial of the first card and the factorial of the second card and the factorial of the third card and the factorial of the fourth card and the factorial of the fifth card is also a perfect square.”

Sum of first four cards' factorials is 169 or 961. For each of these there is again a single factorial adding to them to make a square: 169+5!=289 and 961+6!=1681. So Jose has A4455 or A5656.

Ari: “No face cards. Sum of the factorials of each of my five cards is a 3 digit perfect cube.”

3-digit perfect cubes are 125, 216, 343, 512, 729. Of these, 125 is obviously only 1+1+1+2+120 (so AAA25) which is impossible because John and Jose have three aces between them. 729 is obviously only 1+1+1+6+720 (so AAA36) which is impossible for the same reason. We can get 216 as 44445 (and obviously not in any other way). 343 is impossible (taking two 120s leaves 103 which we clearly can't make with three things <= 24). 512 is impossible (taking four 120s leaves 32 which isn't a factorial). So Ari has 44445. This means that actually Jose has A5566, not A4455, because Ari has all the 4s.

Neal: “No face cards. None of my cards are prime numbers. My five cards add up to a number whose reverse is a factorial.”

Sum of these five cards is at most 50, so it must be 1, 2, 6, or 42. Obviously it can't be 1 or 2, but it also can't be 6 because the only way to make it is 1+1+1+1+2 and 2 is prime. So the sum is 42. The summands are chosen from 4,6,8,9. There actually aren't many ways to do this. We can't use 4 because 49999 only gives 40. We can have 69999 and clearly that's the only way to use 6. Otherwise we have only 8s and 9s and it must be 88899. So Neal has 69999 or 88899. [EDITED to add:] Oops, as pointed out in comments some of Neal's cards could also be 10s, which means there are more possibilities than I listed. Let's see. We still can't use 4 because Ari has all the 4s. We can't use two 6s because 66TTT is only 32; with one 6 we need 36 from the other four which means 9999 (which we already listed) or 899T or 88TT. Otherwise, all 8s, 9s and 10s; five 9s would be 45 so we need five {-1,0,+1} adding to -3 which means either ---00 (meaning 88899, already listed) or ----+ (meaning 8888T). So, finally, Neal has one of these hands: 69999 88899 6899T 688TT 8888T. Of these, the first and last beat Ari's four fours, and the others lose.

What should Ari do?

John has AA223: two pair. Jose has A5656, two pair. If aces aren't considered face cards, presumably Jose's hand beats John's, but in any case neither of them is going to be winning this hand. Ari has 44445, four of a kind. Neal's hand may be better than Ari's or worse; the better possibilities are considerably less likely than the worse ones. John and Jose both have losing hands, and know it, and know that everyone else knows it. They will fold. Ari doesn't know whether he or Neal has the better hand. Neal does know, but knows that Ari doesn't know.

Unless I am missing something, at this point we are out of the realm of pure logic and into that of probability and bidding strategy.

As already mentioned, there are way more possible deals where Neal loses than where Neal wins, so it seems like Ari should place a sizeable bet. As to what he should do after that if Neal doesn't fold, I don't know; it seems like it might depend on things like how much money each has available to bet, how much of a risk-taker Neal is, etc.

• The main difference between our answers is that you seem to have ruled out 10 as a possible card in Jose's hand, could you elaborate on that for me? Apr 26, 2021 at 13:36
• @Gareth McCaughan. Why did you ignore 24 as a factorial (product) for John?
– DrD
Apr 26, 2021 at 13:50
• @DrD I don't think I understand. I didn't ignore it and the hand I think John has has product 24. If you're referring to the first sentence of what I wrote about John's hand, it's referring to the individual cards and there are no cards with number 24 in a standard deck :-). Apr 26, 2021 at 15:17
• @JoshuaBizley Is it possible that you mean Neal's hand, not Jose's? Because I don't see where I could have allowed 10 in Jose's, but rereading what I wrote about Neal's it does look as if I missed some possibilities there. [EDITED to fix a typo.] Apr 26, 2021 at 15:19
• Yes sorry Neal's hand Apr 26, 2021 at 15:21