Friday, 9 October 2026

23 Revisited

The number 23 never ceases to be of interest. Back in November of 2020 I made a post titled Twenty Three in which I looked at some of the properties of this prime number. These included the following:

  • 23 and 239 are the only integers requiring nine positive cubes for their representation
  • 23 has a reciprocal with a period of 22
  • 23 features in and is central to the birthday paradox
  • 23 is a Sophie Germain and safe prime
  • 23 forms part of the first Cunningham chain 2, 5, 11, 23, 47
  • 23 is the smallest odd prime that is not a twin prime
  • 23 is the second Woodell prime (the first is 7)
  • 23 is a factorial prime equal to 4! -1
  • 23 is the second Smarandache–Wellin prime (the first is 2)
  • 23 divides 874, the sum of the first 23 primes
  • 23 is the length of the repunit prime 11111111111111111111111
  • 23 is the only prime \(p\) such that \(p!\) is \(p\) digits long
  • 23 is conjectured to be the only pointer prime that does not contain a 1
The number associated with my diurnal age today, 28313, caught my attention because the number 23 stood out:$$ \textcolor{red}{2}8\textcolor{red}{3}13 = \textcolor{red}{23} \times 1\textcolor{red}{23}1 $$I wondered how common this sort of pattern was so I asked Gemini to write a program to find out. This was the prompt:
Write a program in SageMath that determines all the composite, positive integers in a given range that contain the digits 2 and 3 in ascending order from left to right (but not necessarily consecutively) and whose prime factors also all contain the digits 2 and 3 in ascending order but not necessarily consecutively. The default range can be from 1 to 40000. The output should a table showing number and factors followed by a comma-separated list of the qualifying numbers.

Here is a permalink to the program that returned only one result: 28313. Extending the range to 100,000 gives us the following numbers:

Number     | Prime Factors
--------------------------------------------------
28313      | 23, 1231
52739      | 23, 2293
58213      | 23, 2531
62399      | 23, 2713
62813      | 23, 2731

It is only when we extend the range to one million that we find numbers such that the 23's  are all formed from consecutive digits. I modified the prompt and got Gemini to create a new program:
Write a program in SageMath that determines all the composite, positive integers in a given range that contain the digits 2 and 3 consecutively in ascending order from left to right and whose prime factors also all contain the digits 2 and 3 consecutively in ascending order. The default range can be from 1 to one million. The output should be a table showing number and factors followed by a comma-separated list of the qualifying numbers (permalink).

Here are the results when the program is run: 

123257, 235129, 282923, 286823, 442313, 523381, 533623, 542363, 547423, 552329, 555239, 563323, 672313, 902359, 985823

Number       | Prime Factors
--------------------------------------------------
123257       | 23, 233
235129       | 23, 10223
282923       | 23, 12301
286823       | 233, 1231
442313       | 23, 19231
523381       | 223, 2347
533623       | 23, 23201
542363       | 23, 23581
547423       | 23, 23801
552329       | 239, 2311
555239       | 233, 2383
563323       | 239, 2357
672313       | 23, 29231
902359       | 23, 39233
985823       | 233, 4231

These numbers of course are far beyond what my diurnal age will ever reach but we can identify 29231 as a special number because it contains the digit sequence 23 and when multiplied by 23 produces a new number, 672313, that also contains the digit sequence 23. I may reach this number but it's doubtful whether I'll reach the next (39233) that has the same property. 

Thursday, 8 October 2026

When Dates and Days Align

I put this little problem to Gemini:

A person is born on April 3rd 1949. The day that he is born is reckoned as Day 0 and for every subsequent day 1 is added and this count becomes his diurnal age. Let the number associated with any date be determined as DDMYY where DD is the number associated with the month(1 to a maximum of 31), M is the month (from 1 to 9) and YY is the last two digits of the current year. Thus a date of 14th September 2026 would become 14926. Is there any date, using this system, where the diurnal age equals the date?

Here was its response:

September 23, 2014, is the sole date where the diurnal age mathematically equates to its DDMYY numerical representation. 

That is interesting and so, on the 23rd of September 2014, I was 23914 days old. I got Gemini to write a program that would accept any birthdate as input using this prompt:

Can you write a program in SageMath that will accept any birthdate as input and from there calculate if there is a date where the diurnal age equals the date number using DDMYY format. Let’s realistically limit the person’s possible age to less than 100.  

Here is a permalink to the program and the result for the following birthdate:

  • 23rd August 1964:
    Match found: 05 February 1979 | Diurnal Age / Date Number: 5279
However, I realised that I could be less restrictive with the date format and modified the prompt as follows:
I’d like to modify the program so the acceptable date format can be DMMYY, DDMYY or DMYY. This ensures that the resultant number derived from the date is always less than six digits. Everything else remains the same.

Here is a permalink to the modified program which produces the same results for the two dates examined above. Here are some additional dates:

  • 23rd November 1980:
    Match found: 06 July 1999 | Diurnal Age: 6799 | Date Format: 6799
    Match found: 16 January 2025 | Diurnal Age: 16125 | Date Format: 16125

  • 6th October 2002:
    Match found: 10 September 2032 | Diurnal Age: 10932 | Date Format: 10932

So just a little curiosity. Not all birthdates yield a result within the span of 100 years. You could ask the person born on the 6th October 2002: h
ow many days old will you be on the 10th September 2032? Don't know? Here's a way to find out:
  • 10th \( \rightarrow\) 10
  • September \( \rightarrow\) 9
  • 2032 \( \rightarrow\)  32
  • Concatenation \( \rightarrow\) 10932 \( \rightarrow\) your diurnal age!

Wednesday, 30 September 2026

The Wolfram Alpha Logo

 I used Wolfram Alpha today to determine when I would be 77.77777 years old. 

Yep, 9:21pm on January 11th 2027, midway between my father's birthday on January 9th and my brother Tony's birthday on January 13th. More about that later but, perhaps because of my recent foray into sketching, I happened to notice the logo shown below that appears on the web page. Oddly, I failed to notice the red stellated polyhedra that appears in the image above, maybe because it's quite small.

I asked Gemini the following:

What can you tell me about the Wolfram Alpha logo. It’s an interesting shape. Does it have any history or special significance? Why was this shape shown? Does it have name?

This was the response:

The shape shown is a 2D stylized projection of a \( \textbf{rhombic hexecontahedron}\).

Mathematical History and Properties

  • Origins: The shape was formally described mathematically in 1940 by the German mathematician Helmut Unkelbach.

  • Geometric Structure: It is a \( \textbf{non-convex zonohedron} \) composed entirely of 60 intersecting \( \textbf{golden rhombi} \) (rhombuses whose diagonals align exactly with the golden ratio).

  • Vertices and Edges: The structure features 62 vertices and 120 edges, all organized with perfect \( \textbf{icosahedral symmetry} \).

  • Stellation: It is formed as a stellation of the \( \textbf{rhombic triacontahedron} \), meaning it is created by extending the face planes of a core polyhedron until they intersect again to form a new, more complex outer boundary.

  • Internal Geometry: The internal volume of the shape can be cleanly dissected into 20 acute \( \textbf{golden rhombohedra} \) that meet exactly at the center point.

Significance and Selection as a Logo

  • The "Spikey" Tradition: The rhombic hexecontahedron continues a decades-long corporate tradition initiated by Stephen Wolfram. Since the release of Mathematica 1.0 in 1988, Wolfram products have been represented by complex, mathematically generated 3D polyhedra, affectionately known internally as "Spikeys." While early Mathematica logos featured shapes like the stellated icosahedron and hyperbolic dodecahedron, the rhombic hexecontahedron was designated specifically for the launch of the Wolfram|Alpha engine in 2009.

  • Visualizing Computation: The logo was selected to reflect the computational complexity, algorithmic precision, and mathematical rigor underpinning Wolfram|Alpha. The shape’s composition—made of identical, mathematically strict intersecting faces that combine to form a highly intricate and globally symmetric structure—serves as a visual metaphor for the engine's ability to process massive amounts of disparate raw data and compute unified, structured answers.


Here is what Gemini did with a sketch that I made of the shape using the following prompt:
This image is a 2D stylized projection of a rhombic hexecontahedron, used by Wolfram Alpha as its logo. I need you impose a strict symmetry on the shape and make it look as solid and 3D-looking as possible with shading or whatever. The faces I’ve represented as windows and these should be rendered as translucent with a yellow light emanating, seemingly from within. The overall shape should then look like a polyhedral house with a warm and inviting glow.


Instagram Link

The Golden Rhombus and Golden Rhombohedron referred to earlier look this:


A rhombohedron shown above is an acute golden rhombohedron and it is a cube that has been pushed out of shape so that all of its faces are rhombi. A golden rhombus has a ratio of long diagonal to short diagonal of \( \phi \; : \; 1\). A golden rhombohedron is simply a rhombus with all faces golden rhombi. 
  • The acute angle in a golden rhombus is given by \( 2 \text{arctan} (1/ \phi) \approx 63.43^{\circ} \)
  • The obtuse angle is given by \( 2 \text{arctan} ( \phi) \approx 116.57^{\circ} \) 
Twenty acute golden rhombohedra can be combined to form a solid rhombic hexecontahedron. There is also an obtuse golden rhombohedron but I'll deal with that later.

Tuesday, 29 September 2026

Geometric Interpretation of Tetraprimes

Following on from my previous post titled Tetraprimes, I asked Gemini the following:

I’d like you to create a program in SageMath that will accept any positive integer with up to four not necessarily distinct prime factors as INPUT and if the integer has FOUR prime factors it should return 4D Hypervolume, 3D Surface Volume, 2D Total Face Area and 1D Total Edge Length. If it has THREE factors then 3D Volume, 2D Surface Area and 1D Edge Length are returned. If it has TWO factors then 2D Surface Area and 1D Edge Length are returned. If the input is prime or has more than four factors then this is stated and no output is returned. The factorisation of the numbers shown in the output should also be displayed.

Here is a permalink to the program that it created using 28302 as input. The output looks of the program is shown below:

Input: 28302
4D Hypervolume: 28302 = 2 * 3 * 53 * 89
3D Surface Volume: 48874 = 2 * 7 * 3491
2D Total Face Area: 21732 = 2^2 * 3 * 1811
1D Total Edge Length: 1176 = 2^3 * 3 * 7^2

The program also deals with triprimes and biprimes. Here is the output using 28303 and 28299 as inputs.

Input: 28303
3D Volume: 28303 = 11 * 31 * 83
2D Surface Area: 7654 = 2 * 43 * 89
1D Edge Length: 500 = 2^2 * 5^3

Input: 28299
2D Surface Area: 28299 = 3 * 9433
1D Edge Length: 18872 = 2^3 * 7 * 337

I've incorporated this algorithm into my daily number analysis. 


In the example shown above, we can see easily that 28303 can be interpreted as the volume of a rectangular prism with a surface area that is also a sphenic number and thus interpretable as the volume of another rectangular prism. This additional information for my daily number analysis will prove useful in other ways I'm sure.

Monday, 28 September 2026

Tetraprimes

While I have looked at numbers with four prime factors counted with multiplicity whose reversals also have this property, I've not actually looked at reversible tetraprimes. Numbers with four distinct prime factors are called tetraprimes. The first example of such a number is 1518 where we have:

  • \(1518 = 2 \times 3 \times 11 \times 23 \)
  • \( 8151 = 3 \times 11 \times 13 \times 19 \)
There are 273 such numbers in the range up to 40000 (permalink):

1518, 2046, 2226, 2262, 2418, 2478, 2618, 2622, 2814, 2838, 2886, 3135, 3927, 4170, 4182, 4386, 4389, 4746, 4785, 4935, 5313, 5394, 5406, 5478, 5565, 5655, 5838, 5874, 6018, 6045, 6222, 6402, 6438, 6474, 6486, 6690, 6699, 6834, 6846, 6882, 7293, 7458, 8106, 8142, 8151, 8162, 8346, 8382, 8385, 8547, 8742, 8745, 9834, 9966, 10434, 10506, 11022, 11346, 11814, 11946, 12243, 12441, 12738, 12765, 13026, 13299, 13542, 13629, 13695, 14105, 14118, 14421, 14469, 14574, 15114, 15873, 16005, 16107, 16359, 16665, 16786, 16962, 16995, 17017, 17358, 17589, 17655, 17754, 17922, 18183, 18258, 18447, 18462, 18546, 18615, 18879, 19434, 19437, 19446, 19578, 19662, 20022, 20055, 20085, 20118, 20145, 20163, 20190, 20262, 20310, 20355, 20382, 20405, 20526, 20553, 20559, 20562, 20658, 20746, 20769, 20774, 20878, 20922, 20958, 22002, 22011, 22074, 22098, 22154, 22242, 22290, 22458, 22515, 22533, 22578, 22695, 22710, 22737, 22755, 22854, 22902, 22946, 22962, 22971, 24115, 24123, 24178, 24186, 24198, 24222, 24270, 24297, 24339, 24465, 24530, 24531, 24582, 24585, 24618, 24645, 24662, 24717, 24766, 24846, 24890, 24906, 24915, 24969, 26013, 26103, 26106, 26187, 26202, 26286, 26358, 26394, 26445, 26481, 26490, 26502, 26535, 26554, 26634, 26642, 26691, 26733, 26895, 26922, 26961, 26978, 26985, 26994, 28083, 28086, 28194, 28245, 28302, 28329, 28410, 28446, 28455, 28497, 28509, 28542, 28545, 28578, 28623, 28626, 28635, 28785, 28866, 28886, 28905, 28974, 28985, 28990, 30162, 30426, 31038, 31062, 31146, 31494, 31515, 31614, 31955, 32142, 32574, 32637, 32682, 32745, 32835, 32865, 33198, 33285, 33522, 33594, 33654, 33666, 33762, 34017, 34221, 34386, 34419, 34518, 34554, 34626, 34854, 35502, 35673, 35706, 35826, 36102, 36195, 36218, 36645, 36966, 36993, 37037, 37074, 37158, 37365, 37605, 37653, 37785, 37851, 38055, 38082, 38181, 38445, 39045, 39666, 39738, 39963

I've also considered biprimes as rectangles and triprimes as rectangular prisms but what about tetraprimes. I asked Gemini the following:
A triprime with prime factors of \(a\), \(b\) and \(c\) can be conceived of as a rectangular prism with sides \(a\), \(b\), \(c\), volume \(a \, b \, c\) and surface area equal to \(2 \times (ab + bc + ac) \). Are there equivalent formulae for volume and surface area of a four dimensional object derived from a tetraprime with four prime factors.

Here was Gemini's response:

The direct geometrical equivalent of a tetraprime with four prime factors \(a\), \(b\), \(c\), and \(d\) is a four-dimensional rectangular orthotope (commonly called a hyperrectangle).

Because a 4D object possesses boundaries in multiple lower dimensions (3D, 2D, and 1D), the equivalent to your 3D formulas expands into a hierarchy of measurements. Just as a 3D prism is bounded by 2D faces, a 4D orthotope is bounded by 3D cells, 2D faces, and 1D edges.

Here are the equivalent geometric formulas derived from a tetraprime:

  • 4D Hypervolume (The equivalent of 3D Volume): The total 4D spatial content of the object is simply the product of all four prime factors, which is exactly equal to the tetraprime itself.$$V_4 = a \cdot b \cdot c \cdot d$$

  • 3D Surface Volume (The structural equivalent of 3D Surface Area): In 3D geometry, "surface area" measures the (n-1)-dimensional boundary of the object. For a 4D object, its outer boundary is three-dimensional. A hyperrectangle is enclosed by 8 solid 3D rectangular prisms (called "cells"). There are two cells for each possible triplet of the dimensions.$$S_3 = 2(abc + abd + acd + bcd)$$

  • 2D Total Face Area (The literal equivalent of 2D Area): If you are looking specifically for flat, two-dimensional surface area, a hyperrectangle has 24 flat 2D rectangular faces. For every pair of dimensions, there are 4 identical faces throughout the 4D structure.$$A_2 = 4(ab + ac + ad + bc + bd + cd)$$

  • 1D Total Edge Length: For complete geometric breakdown, a hyperrectangle has 32 one-dimensional edges. There are 8 parallel edges for each of the four prime factors.$$L_1 = 8(a + b + c + d)$$

By substituting your four prime factors into \(V_4\) and \(S_3\), you achieve the exact mathematical analogies for volume and surface area as you step up from three dimensions into four.

I'll investigate this further in a subsequent blog.

The Monty Hall Problem

 I asked Gemini to research the Monty Hall Problem. Here was its response:

The Monty Hall Problem: An Exhaustive Analysis of its History, Mathematics, Game-Theoretic Manifestations, and Psychological Underpinnings

The Monty Hall problem occupies a unique space in the pantheon of mathematical paradoxes. On its surface, it is a straightforward probability puzzle based nominally on the American television game show Let's Make a Deal and named after its original host, Monty Hall. However, beneath its deceptive simplicity lies a profound stress test of human rationality, statistical reasoning, and cognitive processing. The problem confronts a decision-maker with a scenario requiring choice under conditions of imperfect information, followed by an opportunity to update their strategy when new, highly constrained information is introduced. Despite the absolute mathematical certainty of its optimal solution, the problem consistently induces overwhelming cognitive dissonance. It has provoked fierce academic debate, humiliated some of the greatest mathematical minds of the twentieth century, and spawned extensive research across the disciplines of probability theory, behavioral economics, game theory, and comparative psychology.

This comprehensive report systematically dissects the Monty Hall problem. It traces the puzzle's evolutionary history from its academic inception to its explosive cultural impact, meticulously details the mathematical and game-theoretic proofs that govern its solution, categorizes its structural variations, and deeply analyzes the psychological and cognitive mechanisms that cause both laypersons and highly trained experts to systematically fail at solving it.

Historical Precursors and the Genesis of the Modern Dilemma

While the Monty Hall problem achieved global notoriety in the late twentieth century, its structural and mathematical DNA is deeply rooted in older probability paradoxes that explore the counterintuitive nature of restricted conditional information.

Early Mathematical Precursors

The underlying mathematical architecture of the Monty Hall problem is closely related to Joseph Bertrand's Box Paradox, formulated in 1889, which challenged mathematicians to calculate probabilities after one of several mutually exclusive outcomes was eliminated. A more direct ancestor is the "Three Prisoners Problem," a paradox introduced by the acclaimed mathematics writer Martin Gardner in a 1959 issue of Scientific American, and later explored in 1965 by Fred Mosteller in an anthology of probability problems, and in 1968 by John Maynard Smith in Mathematical Ideas in Biology.

In the Three Prisoners Problem, three inmates (A, B, and C) are on death row. The governor decides to randomly pardon one of them. Prisoner A begs the warden to tell him the name of one of the other two prisoners who will be executed. The warden tells A that Prisoner B will be executed. Prisoner A erroneously concludes that his chance of survival has increased from 1/3 to 1/2, failing to realize that the warden's constrained revelation provides no new information about A's own fate, but shifts all the remaining probability to Prisoner C. The mathematical equivalence between the Three Prisoners Problem and the Monty Hall problem is absolute, yet the game show framing of the latter proved to be far more culturally resonant and psychologically disarming.

Steve Selvin and The American Statistician

The specific formulation of the problem involving game show doors, cars, and goats was first formally introduced to the academic community by Steve Selvin, a biostatistician at the University of California, Berkeley. In February 1975, Selvin published a brief letter in The American Statistician titled "A Problem in Probability," which laid out the foundational premise of the game show scenario. Selvin's original scenario asked the reader to imagine three doors, behind one of which was a valuable prize. After the contestant selected a door, the host—who possessed perfect knowledge of the prize's location—opened an unselected door to reveal a booby prize, and subsequently offered the contestant the chance to switch their choice to the remaining closed door.

Selvin's initial letter proved to be immediately controversial among statisticians. The volume of skeptical responses prompted Selvin to publish a follow-up letter in the August 1975 issue of the same journal. In this second letter, Selvin explicitly coined the phrase "Monty Hall problem" and clarified the critical assumptions required for the mathematical solution to hold—namely, that the host's behavior is entirely deterministic regarding the revelation of a losing door, and that the host never reveals the prize prematurely. Despite Selvin's rigorous proofs, the problem remained a relatively obscure academic curiosity for the next fifteen years.

The Cultural Explosion: Marilyn vos Savant and the Academic Backlash

The Monty Hall problem breached the public consciousness and achieved global notoriety in September 1990, when it was featured in Marilyn vos Savant's "Ask Marilyn" column in the Sunday Parade magazine, a publication reaching tens of millions of American households. Vos Savant, who was internationally famous for holding the Guinness World Record for the highest recorded intelligence quotient (IQ) of 228, received a letter from a reader named Craig F. Whitaker of Columbia, Maryland. Whitaker's formulation closely mirrored Selvin's but codified the specific elements that are now considered standard:

"Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, 'Do you want to pick door No. 2?' Is it to your advantage to take the switch?"

Vos Savant correctly answered the question in her column, stating unequivocally that the contestant should switch. She explained that the first door has a 1/3 chance of winning, while the second door retains a 2/3 chance. To help readers visualize the asymmetry, she proposed scaling the problem: imagine a million doors, where a player selects door #1, and the host, knowing the prize location, opens 999,998 goat doors, leaving only door #777,777 closed. In such a scenario, the advantage of switching becomes intuitively obvious.

The publication of this correct solution triggered a vitriolic backlash of unprecedented scale. Vos Savant received an estimated 10,000 letters, with nearly 1,000 of them authored by individuals holding PhDs in mathematics, statistics, and the sciences, overwhelmingly asserting that her solution was mathematically illiterate and demonstrably false. The core of the public's argument rested on the deeply flawed intuition that once one door is eliminated, the remaining two doors must inherently possess an equal 50/50 probability of concealing the car.

The tone of the academic response was unusually aggressive, patronizing, and occasionally tinged with gender-based condescension, revealing a profound institutional arrogance. Several notable academics publicly lambasted vos Savant in letters that have since become cautionary tales in the history of mathematics and cognitive bias.

Critic and Affiliation Excerpt of Criticism Directed at Marilyn vos Savant Implication of the Critique
Scott Smith, Ph.D.
University of Florida
"You blew it, and you blew it big! Since you seem to have difficulty grasping the basic principle at work here, I'll explain. After the host reveals a goat, you now have a one-in-two chance of being correct... There is enough mathematical illiteracy in this country, and we don't need the world's highest IQ propagating more. Shame!" Illustrates the absolute certainty of the "equiprobability bias," where experts erroneously assume remaining options reset to a uniform distribution regardless of the prior state.
Robert Sachs, Ph.D.
George Mason University
"As a professional mathematician, I'm very concerned with the general public's lack of mathematical skills. Please help by confessing your error and in the future being more careful." Highlights how the counterintuitive nature of Bayesian updating can override standard mathematical training, leading to misplaced professional paternalism.
E. Ray Bobo, Ph.D.
Georgetown University
"You are utterly incorrect about the game show question... If you can admit your error, you will have contributed constructively... How many irate mathematicians are needed to get you to change your mind?" Demonstrates the herd mentality within academia when confronted with a veridical paradox that violates intuitive heuristics.
Barry Pasternack, Ph.D.
California Faculty Association
"Your answer to the question is in error. But if it is any consolation, many of my academic colleagues have also been stumped by this problem." A rare acknowledgment that the cognitive illusion is systemic across the academic cohort, despite the assertion that vos Savant was incorrect.

Despite the immense pressure, public ridicule, and academic persecution, vos Savant maintained her position. She published follow-up columns that expanded on the logic and actively challenged her critics to run computer simulations or classroom experiments to verify the empirical truth of her claim. Ultimately, as Monte Carlo simulations were executed nationwide and rigorous mathematical proofs were published in subsequent journals, the academic community was forced into a humiliating retreat, fully validating vos Savant's original answer.

The Paul Erdős Paradox: When Genius Fails

The Monty Hall problem's ability to short-circuit human reasoning is not limited to laypersons or standard academics; it has successfully deceived the highest echelons of mathematical genius. Perhaps the most famous individual to stumble on the problem was Paul Erdős, one of the most prolific, eccentric, and brilliant mathematicians in modern history, renowned for his unparalleled intellect in combinatorics, graph theory, and probability.

Despite his vast expertise, Erdős adamantly refused to accept that switching doors increased the probability of winning to 2/3. When presented with the problem by his colleague and fellow mathematician Andrew Vázsonyi, Erdős aggressively insisted that the probability must be an even 50/50. Erdős failed to intuit how the host's subsequent action could retroactively alter the probability distribution of the initial choice, falling victim to the same cognitive blind spot as the general public.

ErdÅ‘s remained completely unconvinced by standard verbal arguments, formal decision trees, and Bayesian proofs presented by Vázsonyi and others. The stalemate was only broken when Vázsonyi programmed a Monte Carlo computer simulation—a statistical sampling technique ironically pioneered by ErdÅ‘s's close friend and collaborator, Stanislaw Ulam, during the Manhattan Project. Vázsonyi ran the simulation 100,000 times, empirically proving that the switching strategy won roughly 66,666 times.

Faced with undeniable empirical data, Erdős reluctantly accepted the result. However, he famously admitted that he accepted the simulation's output but still did not intuitively understand why it was true. The fact that a mathematician who dedicated his life to the absolute truth of numbers required a brute-force computer simulation to overcome his own cognitive heuristic perfectly illustrates the profound psychological trauma the Monty Hall problem inflicts on the human mind.

Mathematical Foundations and Formal Solutions

The resilience of the Monty Hall problem lies in the inherent tension between unconditioned human intuition and conditioned mathematical reality. A rigorous solution requires a strict definition of the problem's parameters, commonly referred to as the "standard assumptions".

The Standard Assumptions

If the problem is evaluated without constraints, it is mathematically unsolvable, as the host's underlying motivations are unknown and could be entirely arbitrary. To guarantee the 2/3 probability of winning by switching, the following rules must strictly govern the game's mechanics:

  1. The host must always open a door that was not selected by the contestant.
  2. The host must always open a door to reveal a goat, and never the car.
  3. The host must always offer the contestant the opportunity to switch their choice to the remaining closed door.
  4. The car is initially placed behind one of the three doors with a uniform random distribution (a probability of 1/3 for each door).
  5. If the contestant initially selects the winning door, the host chooses between the two remaining goat doors uniformly at random (a probability of 1/2 for each).

The Simple Unconditional Solution

Under these standard assumptions, the simplest logical proof relies on calculating the unconditional probability of winning based on the initial choice, mapping the outcomes across the entire probability space.

When the contestant makes their initial selection, there is a 1/3 chance they have selected the car, and a 2/3 chance they have selected a goat. Because the host is forced to reveal a goat from the unchosen doors, the host's action provides no new information about the contestant's initial door, but it acts as a sieve, distilling perfect information about the unchosen doors.

The strategy of "always switching" can be evaluated by mapping the only three possible starting states:

Contestant's Initial Choice Host's Mandated Action Remaining Closed Door Outcome of Switching Strategy Outcome of Staying Strategy
Goat 1 (Probability 1/3) Must open Goat 2 Car Wins Car Loses
Goat 2 (Probability 1/3) Must open Goat 1 Car Wins Car Loses
Car (Probability 1/3) Randomly opens Goat 1 or 2 The other Goat Loses Wins Car

Because the contestant is twice as likely to initially select a goat as they are a car, and because selecting a goat mathematically forces the host to reveal the only other goat (thereby guaranteeing a win if the player switches), the switching strategy inherently yields a win 2/3 of the time. Conversely, the "stay" strategy relies entirely on the 1/3 probability of picking the car on the first attempt, a probability that remains hermetically sealed and unchanged by the host's subsequent actions.

Scaled Variations: The N-Doors Mental Model

To bypass the cognitive block created by the small sample size of three doors, statisticians and educators frequently utilize the 1,000-door or 100-door manifestation of the problem.

In a 1,000-door scenario, the contestant selects Door 1, establishing a 1/1000 chance of being correct, while a 999/1000 chance exists that the car is among the other 999 doors. The host, possessing perfect knowledge, then explicitly avoids the car and opens 998 goat doors, leaving only Door 1 and, for example, Door 777,777 closed.

By scaling the problem to macroscopic proportions, the asymmetry of information becomes starkly apparent to human intuition. The contestant intrinsically understands that their initial random guess is almost certainly wrong (99.9% probability of failure) and that the host's highly selective action of leaving exactly one other door closed acts as a deliberate beacon pointing to the prize. In any generalized N-door game where the host opens N-2 doors, the probability of winning by switching is formulated as (N-1)/N, which asymptotically approaches a 100% success rate as N approaches infinity.

The Conditional Probability Solution and Bayes' Theorem

While the simple solution conclusively proves that the overall strategy of switching wins 2/3 of the time across all games, academic statisticians—most notably Morgan et al. in a highly influential 1991 paper in The American Statistician—argued that the simple unconditional solution is incomplete and mathematically inadequate.

Morgan et al. asserted that the player is not asking about the aggregate probability of winning over infinite games, but rather faces a specific conditional probability problem: they have chosen Door 1, and the host has opened specifically Door 3. The question is whether the probability is 2/3 given the specific conditions of the board.

Using Bayes' theorem, this conditional probability can be calculated explicitly. Let Ci be the event that the car is hidden behind door i ∈ {1, 2, 3}. The prior probabilities reflect the uniform random distribution of the prize: P(C1) = P(C2) = P(C3) = 1/3. Let Hj be the event that the host opens door j. Assuming the player picks Door 1, the host's protocol dictates the conditional probabilities (the likelihoods) of the host specifically opening Door 3:

  • If the car is behind Door 1 (C1), the host is unconstrained and can open Door 2 or Door 3 with equal probability. Thus, P(H3 | C1) = 1/2.
  • If the car is behind Door 2 (C2), the host is mathematically forced to open Door 3 to avoid revealing the car. Thus, P(H3 | C2) = 1.
  • If the car is behind Door 3 (C3), the host cannot open Door 3. Thus, P(H3 | C3) = 0.

To find the posterior probability that the car is behind Door 2 given that the host opened Door 3, Bayes' rule is applied:

P(C2 | H3) = [ P(H3 | C2) P(C2) ] ÷ [ P(H3 | C1)P(C1) + P(H3 | C2)P(C2) + P(H3 | C3)P(C3) ]

Substituting the calculated likelihoods and priors into the equation:

P(C2 | H3) = [ 1 × 1/3 ] ÷ [ (1/2 × 1/3) + (1 × 1/3) + (0 × 1/3) ] = (1/3) ÷ (1/6 + 1/3) = (1/3) ÷ (1/2) = 2/3

This rigorous Bayesian formulation confirms that the conditional probability of winning by switching to Door 2 is exactly 2/3, perfectly mirroring the unconditional overall probability. However, the crucial revelation of Morgan et al.'s analysis is that this result only holds true if P(H3 | C1) = 1/2—meaning the host must be completely unbiased when choosing between two goats. If the host has a psychological preference for opening higher-numbered doors or right-most doors, information leaks from the host's choice, altering the final probability.

Critiques of the Bayesian Modeling: Richard Gill

The reliance on conditional probability and Bayesian modeling to solve the Monty Hall problem has itself been heavily critiqued. Statistician Richard D. Gill has argued that framing the problem strictly as an exercise in computing conditional probabilities from "obvious" assumptions is an example of "solution-driven science" and poor mathematical modeling.

Gill notes that the original question posed by Craig Whitaker to vos Savant asked for a practical action ("Is it to your advantage to switch?"), not for a specific probability calculation. Gill argues that the player actually has two moments of decision: taking action before the show begins, and reacting during the show. By utilizing von Neumann's minimax theorem from game theory, Gill asserts that a player can simply decide before the show to pick a door using a fair die (ensuring a completely random 1/3 start) and commit to a switching strategy. This predetermined strategy guarantees a 2/3 win rate entirely independent of the host's hidden biases, the car's initial placement, or the necessity of conditional probability calculations. Gill's critique highlights that the danger in statistics lies in making default assumptions to fit an equation, rather than modeling the reality of human ignorance.

Game Theory and Strategic Interactions

Beyond classical probability, the Monty Hall problem serves as a robust foundational model within game theory, specifically analyzed as a sequential game in extensive form with imperfect information. The game is modeled as a contest between two players: "Nature" (representing the Host/Monty) and the Contestant (Amy).

In this framework, the game is represented by a directional game tree. The host moves first by secretly placing the prize. The contestant moves second by selecting a door. The host moves third by opening an unselected door, and the contestant makes the final move to stay or switch. Because the contestant does not know the initial placement of the prize, they are operating within an "information set" that encompasses multiple indistinguishable nodes on the game tree, classifying it as a game of imperfect information.

If the game is treated as a zero-sum game where Monty's goal is explicitly to minimize the contestant's payoff, the Minimax theorem applies. However, when framed as a Bayesian game of incomplete information, the host can be granted varying degrees of freedom. By endowing Monty and the contestant with common prior probabilities (p) regarding Monty's motives—whether he is "sympathetic" and wants the contestant to win, or "antipathetic" and wants them to lose—the set of Bayes Nash Equilibria (BNE) shifts dramatically. Under the strict standard assumptions, backward induction reveals that the subgame perfect equilibrium dictates the contestant should always switch.

Alternative Manifestations and Host Protocols

The problem's reliance on the host's protocol means that minor alterations to the host's behavior drastically alter the mathematical outcomes. The following table summarizes known manifestations based on differing host protocols:

Host Behavior / Game Protocol Impact on Information and Strategy Mathematical Outcome
Ignorant Host (Random Fall)
Host does not know where the car is and opens a random unchosen door. By pure luck, it reveals a goat.
The game collapses to a true 50/50 scenario. The new information eliminates the 1/3 universe where the host accidentally reveals the car. The host's survival is pure chance. Switching wins 1/2 of the time. Sticking wins 1/2 of the time.
Adversarial Host
Host only offers the option to switch if the contestant initially selected the winning door.
The host uses the offer to switch as a psychological trap to steal a guaranteed win from the contestant. Switching always loses (probability of winning by switching is 0).
Angelic Host
Host only offers the option to switch if the contestant initially selected a goat.
The host acts as a savior, offering a lifeline only when the player is objectively doomed. Switching always wins (probability of winning by switching is 1).
Biased Host (Morgan et al.)
The host always reveals a goat, but if the player chooses the car, the host prefers the rightmost goat with probability q and the leftmost with probability p (p+q=1).
The host's bias leaks vital information. If the host opens the preferred door, it reduces the probability that the contestant guessed wrong initially. If the host opens the preferred rightmost door, switching wins with probability 1/(1+q).

Psychological Impediments and Cognitive Biases

The core fascination with the Monty Hall problem is not mathematical, but psychological. Why do human beings, including highly trained mathematicians, consistently and fiercely arrive at the wrong conclusion? Cognitive psychologists have identified several overlapping heuristics, evolutionary biases, and cognitive capacity limits that collectively blind the human mind to the optimal Bayesian strategy.

The Equiprobability Bias and Laplace's Principle

The most dominant factor contributing to the astronomical failure rate (with up to 90% of initial subjects choosing to stay) is the "equiprobability bias," an illusion rooted in a misapplication of Laplace's Principle of Indifference. When faced with an unknown probability distribution across multiple remaining options, human beings intuitively invoke an unearned symmetry, assuming that because there are two doors left, each must possess a 50% chance of containing the prize.

This illusion stems from a failure to recognize that the elimination of a door was non-random and highly deterministic. Humans tend to discard the historical context of a problem—the initial 1/3 probability structure—and view the final two doors in a vacuum as an entirely new probability space (n=2), rather than recognizing the second door as an amalgamation of the unchosen probability space (2/3).

Emotional Choice Biases: Illusion of Control and Anticipated Regret

Even when individuals are intellectually exposed to the math, they exhibit severe "switch aversion" driven by deeply ingrained emotional and evolutionary biases.

  1. Illusion of Control and the Endowment Effect: Once a subject selects a door, they psychologically take ownership of it. The "endowment effect" causes them to artificially overvalue their initial choice simply because it is theirs. The act of changing doors feels like a surrender of agency to an external force (the host), creating an illusion of lost control.
  2. Anticipated Regret and Counterfactual Thinking: In human psychology, the emotional penalty for an error of commission (acting and failing) is vastly more severe than the penalty for an error of omission (doing nothing and failing). If a contestant sticks with Door 1 and loses, they attribute it to bad luck. However, if they actively switch to Door 2 and lose (thereby abandoning the winning door), they experience an intense, self-blaming regret based on counterfactual rumination. The desire to insulate oneself from this specific, acute type of future regret drives players to stick with the safety of the status quo.

Working Memory Limitations and Bayesian Deficits

Cognitive research indicates that humans are notoriously poor at Bayesian reasoning—specifically, the ability to update conditional probabilities based on new evidence. Studies by De Neys and Verschueren have shown a direct correlation between working memory capacity and success in the Monty Hall Dilemma.

Solving the problem requires suppressing the intuitive "heuristic" system (which defaults to 50/50) and engaging the computationally taxing "analytic" system to partition the probabilities and build mental models of all possible outcomes and causal chains. Individuals with lower working memory capacities struggle to hold the multiple conditional scenarios (e.g., "If I pick Goat 1, he opens Goat 2; if I pick the Car, he opens Goat 1") in their mind simultaneously, causing their cognitive processing to crash and default back to the heuristic illusion of equiprobability.

Behavioral Economics, Learning, and Probability Matching

Behavioral economists have utilized the Monty Hall problem extensively to test whether market forces, repetition, and transparent feedback can cure irrational behavior over time. Daniel Friedman (1998) argued that the initial failure to switch is a "pseudo-anomaly"—a transient error reflecting behavior in an unfamiliar environment that should vanish as subjects learn from repeated exposure.

However, experimental data reveals that unassisted human learning is remarkably slow and inefficient in this context. When humans play the standard 3-door game repeatedly for financial incentives, their switching rates only marginally increase, often plateauing around 60% to 66%, rather than converging on the optimal 100% maximization. This plateau is due to a phenomenon called "probability matching." If a strategy wins 2/3 of the time, humans tend to choose that strategy 2/3 of the time, erroneously believing they are aligning themselves with the odds, rather than playing the winning strategy 100% of the time to maximize aggregate expected utility.

To reliably break the cognitive block, researchers found that radical interventions were required. Chen and Wang (2010) demonstrated that subjects needed to play the 100-door variant to shatter their biases. Subjects who experienced the 100-door game quickly learned to switch nearly 100% of the time because the asymmetry was undeniable. Crucially, when these subjects were subsequently returned to the standard 3-door game, their switching rates remained incredibly high (over 80%), indicating that experiencing the extreme manifestation of the problem allowed the learned rationality to transfer to the more ambiguous 3-door environment.

Comparative Psychology: The Pigeon Paradox

Perhaps the most humiliating blow to human intellectual exceptionalism regarding the Monty Hall problem comes from the field of comparative psychology. In a landmark 2010 study published in the Journal of Comparative Psychology, researchers Walter Herbranson and Julia Schroeder tested the decision-making capabilities of Silver King pigeons (Columba livia) using an avian analogue of the Monty Hall dilemma to determine if animals suffered from the same cognitive deficits as humans.

Experimental Setup and Avian Supremacy

Herbranson and Schroeder placed six pigeons in operant conditioning chambers equipped with three illuminated response keys. A trial mirrored the game show: the pigeon pecked a key (initial choice), the computer deactivated an unselected, non-reinforced key (Monty's action), and the pigeon was then allowed to peck again to stay or switch. Correct choices were rewarded with access to mixed grain.

Remarkably, the pigeons easily outperformed their human counterparts. On the first day of testing, the pigeons behaved much like humans, switching only about one-third of the time. However, over the course of a month of daily testing, all six pigeons dynamically adjusted their behavior to maximize their grain rewards, eventually learning the optimal strategy and switching on nearly 100% of the trials.

To provide a direct comparison, Herbranson and Schroeder tested thirteen human undergraduate students using an identical, uncontextualized touch-screen setup (removing the game show narrative to prevent overthinking). Even after 200 iterations over a month of testing, the human students failed to maximize, succumbing to probability matching and plateauing at a switching rate of about 66%.

The Mechanics of the Pigeon's Success

The discrepancy in performance is attributed to the distinct ways humans and birds process statistical environments. Humans over-intellectualize the problem. By attempting to logically deduce the hidden structure of the game, humans fall victim to their faulty heuristics (like the illusion of equiprobability) and the emotional baggage of anticipated regret.

Pigeons, entirely unburdened by logic, higher-order causal reasoning, or emotional regret, rely strictly on empirical reinforcement learning. They are natural maximizers in this context. Through classical conditioning and trial-and-error, the pigeons simply track which behavior yields the highest frequency of food delivery. Because the switching mechanic is reinforced twice as often as staying, the pigeons mechanically adapt their behavior to match the optimal mathematical reality, entirely sidestepping the cognitive traps that ensnare human beings.

Subject Type Dominant Cognitive Approach Response to Reinforcement Ultimate Strategy Reached
Humans Top-down logic, heuristic reliance, over-intellectualization, counterfactual rumination. Probability matching (switching ~66% of the time). Sub-optimal. Plateaus without reaching maximization.
Pigeons Bottom-up empirical learning, classical operant conditioning. Maximizing (switching ~100% of the time). Optimal. Perfect adaptation to the mathematical reality.

Modern Computational Simulations and LLMs

In the modern era, the problem has transitioned from a manual mathematical debate into a benchmark for computational simulations and artificial intelligence. Much like Andrew Vázsonyi utilized early Monte Carlo simulations to convince Paul Erdős in the 1990s, modern data scientists and programmers routinely use the Monty Hall problem to test logic flows in code.

Recently, the problem has been applied to test the logical boundaries of Large Language Models (LLMs). As noted by technology writer Anil Ananthaswamy, models like Claude 3.5 Sonnet can effortlessly generate pseudo-code to run 10,000 iterations of the Monty Hall game, plotting the exact point where the probabilities converge on 1/3 for staying and 2/3 for switching. While LLMs easily spit out the correct code and answer, it is largely because the solution is highly represented in their training data. Whether AI systems natively "understand" the conditional probability trap any better than Paul Erdős did remains a subject of ongoing epistemological debate in computer science.

Conclusion

The Monty Hall problem is far more than a recreational math puzzle; it is a fundamental stress test of human rationality and statistical perception. From its academic origins in Steve Selvin's 1975 correspondence to the massive public uproar ignited by Marilyn vos Savant in 1990, the problem has routinely exposed the extreme fragility of human intuition. It serves as a stark reminder that advanced education does not inoculate an individual against cognitive bias; indeed, the vitriolic response from the academic community toward vos Savant highlighted a dangerous institutional arrogance that preferred intuitive comfort over mathematical proof.

The absolute mathematical truth of the problem—that switching leverages the host's strict constraints to double the probability of winning to 2/3—is unassailable under the standard assumptions. This truth is verified through unconditional mapping, rigorous Bayesian conditional probability calculations, and game-theoretic extensive models. Yet, the human mind's reliance on the illusion of equiprobability, compounded by the emotional dread of anticipated regret and the computational limitations of working memory, creates a near-impenetrable barrier to spontaneous logical resolution.

The ultimate irony of the Monty Hall problem is flawlessly captured in the comparative studies between humans and pigeons. By abandoning the search for an underlying logical narrative and simply observing the raw empirical outcomes of the environment, a bird can effortlessly master a probabilistic framework that has consistently defeated thousands of human PhDs and paralyzed mathematical geniuses like Paul Erdős. In the study of decision theory and probability, the Monty Hall problem stands as an enduring monument to the fact that human intelligence, with all its evolutionary complexity and capacity for abstract reasoning, is frequently the very instrument of its own deception.

Friday, 25 September 2026

Silly Little Trick

I had to ponder this a little while. The trick as to why it works is to realise that 96 and 1930 give the current year (2026) when added together. Let's say you are \(x\) years old. We can form the following equation:$$ \begin{align} 96 - x + 1930 &=  \text{ Year you were born} \\ 2026 - x&=2026 - x \end{align}$$Any combination of two numbers that add to 2026 will work e.g. 100 and 1926. This combination however, would immediately draw suspicion because it's easy to see that the two add to 2026. However, the problem should read:
  • A book has 96 pages 
  • Subtract the age you will turn this year 
  • Add the result to 1930 
  • You will find the year you were born

Next year the book would need to have 97 pages and so on. I asked Gemini to create a similar problem:

Can you propose another age related trick mathematical question in the spirit of the one shown in the image but different and not easy to spot the mathematical trickery behind it. 

Here's what it came up with:

 Try this sequence to find someone's birth year:

  • Take the number of months in a year (12).

  • Multiply it by the number of days in a standard week (7).

  • Multiply that result by the number of hours in a day (24).

  • Add the total number of fingers on your hands (10).

  • Subtract your current age.

The final number will be the exact year you were born.

The Mathematical Breakdown

All age-calculating tricks ultimately rely on the same fundamental algebraic formula: $$\text{Current Year} - \text{Age} = \text{Birth Year}$$The key to making the trick impressive is how well you hide the current year from the participant.

The example shown in the above image thinly veils this formula by splitting the current year (2026) into two arbitrary numbers: 96 and 1930. The instructions ask you to subtract your age from the page count (96) and then add 1930. Mathematically, this is simply \( (96 + 1930) - \text{Age}\), which immediately resolves to \(2026 - \text{Age}\). The trickery is easy to spot because the numbers are combined using basic addition, and 1930 already looks suspiciously like a year.

The proposed trick above is much harder to spot because it obfuscates the constant (2026) by burying it at the end of a multi-step multiplication chain. It also uses a psychological misdirection: by asking the person to multiply time-related trivia (months, weeks, days, hours), they assume the math has something to do with calculating the lifespan in hours or days.

Here is how the hidden constant is built:$$\begin{align} 12 \text{ (months)} \times 7 \text{ (days)} &= 84\\84 \times 24 \text{ (hours)} &= 2016 \\ 2016 + 10 \text{ (fingers)} &= 2026 \end{align} $$By the time the participant calculates 2026, their working memory is occupied by the multiplication steps rather than recognizing that they have just arrived at the current year. Subtracting their age from this stealthily generated 2026 yields their birth year perfectly. (Note: As with all standard age tricks, this assumes the participant has already celebrated their birthday in the current calendar year; otherwise, the result will be off by one).