Making any integer with four 2s
The article explores a mathematical puzzle using four instances of the digit 2 to create any natural number through various operations, highlighting educational examples and historical contributions from mathematicians.
Read original articleThe article discusses a mathematical puzzle involving the use of exactly four instances of the digit 2 to create any target natural number through various mathematical operations. It provides examples suitable for different educational levels, starting with simple equations for elementary school students, such as using addition and division to create numbers like 1, 2, and 3. As the complexity increases, middle school students can utilize exponents and factorials to generate larger numbers, including 18 and 28. The article also highlights creative approaches to reach specific numbers, such as using the Gamma function to easily derive 7. It notes that mathematicians have historically enjoyed this puzzle, with Paul Dirac's discovery of a general solution for all numbers being a notable point in its history. The article concludes by presenting a general formula for expressing any number using nested square roots and logarithms, while ensuring the use of exactly four 2s, thus maintaining the integrity of the puzzle.
- The puzzle involves using four 2s to create any natural number.
- Simple operations can generate small numbers, while advanced math allows for larger numbers.
- The Gamma function and complex numbers can simplify reaching certain targets.
- Paul Dirac found a general solution for expressing any number with this method.
- The challenge lies in creatively using mathematical operations while adhering to the four 2s rule.
Related
What is the longest known sequence that repeats in Pi? (homelab)
The article explores repeating sequences in Pi's decimal representation, detailing the transition from Python to C for efficiency, successful identification of sequences, and plans for further extensive searches.
Memorizing the first 100 perfect squares (2022)
The article outlines techniques for memorizing the first 100 perfect squares, emphasizing patterns and tricks over brute force memorization to aid mental calculations and recognize square numbers efficiently.
A Puzzle about a Calculator
Katie Steckles discusses her first year managing the BrainTwisters column, presenting a puzzle about forming four-digit numbers from a calculator keypad, all of which are divisible by 11.
Cab Numbers
Cab Numbers, defined by distinct digits, can be products of two numbers with the same digits. The highest known example is 8745231 multiplied by 96, yielding 839542176.
Making any integer with four 2s
The article presents a mathematical puzzle using four instances of the digit 2 to create any natural number, exploring various operations and concepts suitable for different educational levels.
- Many commenters reference similar puzzles, such as the "four fours" challenge, highlighting its historical significance and variations.
- There is a debate over the use of functions and operations, with some arguing that it complicates the spirit of the game.
- Several users share their own methods and solutions for generating numbers, showcasing creativity in mathematical approaches.
- Comments reflect on the educational value of such puzzles and their role in developing problem-solving skills.
- Some users express skepticism about certain solutions, questioning whether they adhere to the original rules of the puzzle.
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.
Okay, then this is easy, just use the successor function.
S(n) = n+1
6 = 2*2*2-2
7 = S(2*2*2-2)
8 = S(S(2*2*2-2))
Etc.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,
5 = ⌊√√√√√(4!)!⌋
because 24! lies between 5^{32} and 6^{32}.I made a stack machine with single character instructions and needed to solve a variation of this problem. I had just the digits 0 through 9. The characters '23' would be push 2 followed by push 3. To actually represent the number 23 you would use
45*3+
or something similar.
That left me with the problem of how to encode each integer in the fewest characters.Tools at hand.
The digits 0 through 9
'P': Pi
'*': (a * b),
'/': (a / b),
'-': (a - b),
'+': (a + b),
's': sin(a),
'c': cos(a),
'q': sqrt(a),
'l': log(a),
'~': abs(a),
'#': round(a),
'$': Math.floor(a),
'C': clamp(a),
'<': min(a, b),
'>': max(a, b),
'^': pow(a, b),
'a': atan2(a, b),
'%': positiveMod(a, b),
'!': (1 - a),
'?': (a <= 0 ? 0 : 1)
'o': a xor b scaled by c; ((a*c) xor (b*c))/c
'd': duplicate the top stack entry
':': swap the top two stack entries
';': swap the top and third stack entries
I have wondered about revisiting the stack machine with a complex number stack to see what I can come up with.(Next time I post something like this I am not going to use my phone)
One small wrinkle, if you ignore the fact that the root notation conceals exponentiation by 1/2, by making that common value a default.
That's a lot of hidden 2's!
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...
It was a lot of fun, you tend to develop strategies and the game has a simple, efficient UX. Fair warning, it is very time consuming.
[0] https://apps.apple.com/fr/app/tchisla-number-puzzle/id110062...
128 = √(2 / √√(√2 - (2 / √2)))
8192 = √√(2 / ((√2 * √2) - 2))
16384 = (2 / √√(√2 - (2 / √2)))
67108864 = √(2 / ((√2 * √2) - 2))
134217728 = (2 / √(√2 - (2 / √2)))
4503599627370496 = (2 / ((√2 * √2) - 2))
9007199254740992 = (2 / (√2 - (2 / √2)))
6369051672525773 = (√2 / (√2 - (2 / √2)))
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
"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.
At any rate they invented algebra so maybe there's something to it
Edit: It was the man who counted, definitely apocryphal, as it was written in the 20th century
but in this case there is a unsolved gap!
https://en.wikipedia.org/wiki/Superior_highly_composite_numb...
7 = (2+2)#+2/2
https://en.wikipedia.org/wiki/PrimorialI solved the puzzle for 1-10 before looking at the answers, and this was my solution for 7:
⌊√222⌋/2
or more readably:
floor(sqrt(222)) / 2
All those are allowed, so what's the problem?
Getting to 7 is notoriously difficult
What am I missing?2 * 2 * 2 - 2/2
7 = 2/2 + 2 + 2 + 2
Then you just add it multiple times
And if 0 is an integer.
2/2-2/2
Related
What is the longest known sequence that repeats in Pi? (homelab)
The article explores repeating sequences in Pi's decimal representation, detailing the transition from Python to C for efficiency, successful identification of sequences, and plans for further extensive searches.
Memorizing the first 100 perfect squares (2022)
The article outlines techniques for memorizing the first 100 perfect squares, emphasizing patterns and tricks over brute force memorization to aid mental calculations and recognize square numbers efficiently.
A Puzzle about a Calculator
Katie Steckles discusses her first year managing the BrainTwisters column, presenting a puzzle about forming four-digit numbers from a calculator keypad, all of which are divisible by 11.
Cab Numbers
Cab Numbers, defined by distinct digits, can be products of two numbers with the same digits. The highest known example is 8745231 multiplied by 96, yielding 839542176.
Making any integer with four 2s
The article presents a mathematical puzzle using four instances of the digit 2 to create any natural number, exploring various operations and concepts suitable for different educational levels.