![]() |
|
![]() |
| > I feel like the second you allow functions you've thrown the spirit of the game.
+, - (both binary and unary), ×, ÷ are functions, as is raising to a power. Why would you allow them? As always in this kind of things, one can disagree about what constitutes an elementary function, but I don’t think taking square roots should be disqualified in this puzzle. > Ex, the gamma function is (n-1)! And 2 is just S(S(0)) (https://en.wikipedia.org/wiki/Peano_axioms) > If I can hide numbers in a function call... It's trivially easy to always succeed. I wouldn’t call the construction given by Paul Dirac trivial. Do you think it is, or do you know of a simpler one? |
![]() |
| > And 2 is just S(S(0))
This is a good example of why you need rules on which functions are allowed. Repeated application of the successor function makes the entire exercise trivial |
![]() |
| Not sure what you mean with "correct", because "correct" is an equivalence class of slightly different definitions? Eg. https://en.wikipedia.org/wiki/Peano_axioms has, instead of both yours and mine:
They would all be proven in the same manner, though some might be slightly stronger in relation to commutation, making some proofs easier off the bat. |
![]() |
| I would argue that the Gamma function is more fundamental than the factorial operation. But you are still correct that if arbitrary functions were allowed, the game would degenerate to triviality. |
![]() |
| > I feel like...you've thrown the spirit of the game.
It's a little "brain teaser" game, to encourage kids to practice fairly basic math. Don't take it too far out of context. |
![]() |
| > use any mathematical operations
Okay, then this is easy, just use the successor function.
Etc. |
![]() |
| S(N) is just S(N), it's not N+1 unless you define it that way. S(0) is not 1, it's S(0). The successor function doesn't really get mapped to numbers without an explicit additional mapping. |
![]() |
| No, it's not. That's just the standard model of peano arithmetic. You can map the successor function to many different operations and objects that aren't even numbers. |
![]() |
| Yes it is. "1" is just a label for what is also known as S(0) no mater what other ways you invent to refer to that element. Just like 一 is another label for the same concept. |
![]() |
| See also: "Representing numbers using only one 4" written by a 26-year-old Donald Knuth in 1964 (https://www.jstor.org/stable/2689238 reprinted as Chapter 10 of his Selected Papers on Fun and Games) — it uses the single digit 4, and the three operations √x (square root), ⌊x⌋ (floor, i.e. greater integer not greater than), and x! (factorial), and ends with a (still unsolved) conjecture about whether every integer can be represented in this way.
The appendix (written for the book in 2011) points out an earlier (1962) 1.5-page paper π in Four 4's by J. H. Conway and M. J. T. Guy, written when they were students at Cambridge, that has a similar idea: https://archive.org/details/eureka-25/page/18/mode/1up?view=... For example,
because 24! lies between 5^{32} and 6^{32}. |
![]() |
| Maybe it's just me, but writing sqrt(2+2) instead of sqrt(2*2) or sqrt(2^2) was such an odd choice. It obfuscates the reason why 2=sqrt(2+2), and unnecessarily so. |
![]() |
| I agree it potentially wasn't a conscious choice, but it's still interesting nonetheless.
I wasn't criticizing him for this, but rather fascinated that this is the variant that was chosen. |
![]() |
| Sorry, the intention was just to show a cool use of complex numbers, not claim this is the simplest method to generate 12 which is pretty simple, as you demonstrate. |
![]() |
| Though as I said in the rest of my comment, the 2+2 unwrap only works for N=2. So it's not a general unwrap, but rather a specific example that happens to work for N=2. |
![]() |
| What about making each digit be the instruction "times 10 plus digit", with a different instruction to push a 0, like a space? Then you can represent 23 with " 23". |
![]() |
| Related: there as a reverse engineering/CTF challenge (which shall remain nameless to prevent you from cheating) where my solution involved injecting shellcode that adds specific number to the stack pointer. But your shellcode -- including the number(s) you add -- can only involve bytes from the ascii alphanumeric set.
So I used a SAT solver to find a combination of numbers, not using prohibited bytes, that add up to the number I really want. https://docs.google.com/presentation/d/19K7SK1L49reoFgjEPKCF... |
![]() |
| I love this:
> Note that these are large files; both are over 1.6 Megabytes, so don’t load these if you have a slow Internet connection Just shows how far internet speeds have come... |
![]() |
| That's the one!
That's how I learned about false induction. I also liked the one about the men who were lined up and had something on their backs and they had to guess what it was. |
![]() |
| Here are some values that are (understandably) not listed on the blog. They happen only due to the limited precision of floating point formats.
I found these by accident a long time ago but kept them because they do "work". Try to input one expression in the lil box in https://www.wolframalpha.com/?source=nav and they will quickly evaluate to these values; the charade goes away after you press Enter and get the (mathematically) correct answer.My old solvers from what feels like a previous life: https://madflame991.blogspot.com/2013/02/four-fours.html https://madflame991.blogspot.com/2013/02/return-of-four-four... That was fun |
![]() |
| Nice! Looking into them a bit deeper, they all rely on two facts involving quantities that are off by 1 ulp:
and all other calculations after that are mathematically exact. For example:
and
In your last one,
(https://float.exposed/0x4336a09e667f3bcd) where the second value is the exact value of the floating-point representation of √2 (i.e. the closest representable-in-float64 value to √2). |
![]() |
| Very clever, but using an arbitrary number of square roots seems almost cheating since it’s practically another symbol for a “2” (exponent of 1/2) |
![]() |
| > I've read about this story in Graham Farmelo's book The Strangest Man: The Hidden Life of Paul Dirac, Quantum Genius.
"The Strangest Man": https://en.wikipedia.org/wiki/The_Strangest_Man Four Fours: https://en.wikipedia.org/wiki/Four_fours : > Four fours is a mathematical puzzle, the goal of which is to find the simplest mathematical expression for every whole number from 0 to some maximum, using only common mathematical symbols and the digit four. No other digit is allowed. Most versions of the puzzle require that each expression have exactly four fours, but some variations require that each expression have some minimum number of fours. |
![]() |
| Why not use 3 2’s to make n + 2 or n - 2? That’s a lot easier than making a subscript so complicated.
This is the Curse of Knowledge. OP stared too long into the abyss. |
![]() |
| The problem is allowing arbitrary numbers of unary operators. If you allowed ++ increment it would be trivialized even easier. Could even do all complex numbers with only 2 twos. |
![]() |
| Same here, our sixth grade teacher assigned it. I wrote a BASIC program on the TRS80 to try to find solutions. Printed each solution it found to the dot matrix printer. |
![]() |
| Thanks—I think we'll merge the comments hither because this submission was the first, and because the other submitter currently has a second article on the frontpage right now. |
Ex, the gamma function is (n-1)! So now you're making 7 with four twos and a one. You've broken the spirit.
If I can hide numbers in a function call... It's trivially easy to always succeed.