Post Reply 
Challenge: Generate 24 in the X register / display
09-07-2020, 10:51 PM (This post was last modified: 09-07-2020 11:21 PM by Hlib.)
Post: #32
RE: Challenge: Generate 24 in the X register / display
HP-50g, RPN mode. To ensure the least number of keystrokes I`ve made a custom
soft menu for four functions: DUP, SQ(x^2), !(factorial), NOT.
{ DUP SQ ! NOT } `CST` STO [LS] [MODE] Thus number of steps in the solution match the keystrokes.
The universal chain N DUP + N ÷ SQ ! (seven clicks) comes up to every number except zero.
But in some particular cases, this can be made more shorter.
#9 24=√9×9–√9 || 9 √ 9 × 9 √ – || 7 steps(clicks)
#8 24=8+8+8 || 8 DUP + 8 + || 5 steps(clicks)
#7 24=(((7+7)÷7)^2)! || 7 DUP + 7 ÷ SQ ! || 7
#6 24=6^2–6–6 || 6 SQ 6 – 6 – || 6
#5 24=5^2–5÷5 || 5 SQ 5 DUP ÷ – || 6
#4 24=4^2+4+4 || 4 SQ 4 + 4 + || 6
#3 24=3^3–3 || 3 DUP y^x 3 – || 5
#2 24=(((2+2)÷2)^2)! || 2 DUP + 2 ÷ SQ ! || 7
#1 24=(((1+1)÷1)^2)! || 1 DUP + 1 ÷ SQ ! || 7
#0 24=... || 0 NOT 0 NOT + 0 NOT ÷ SQ ! || 10
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Challenge: Generate 24 in the X register / display - Hlib - 09-07-2020 10:51 PM



User(s) browsing this thread: 4 Guest(s)