42.4242424242 Message #1 Posted by Gerson W. Barbosa on 17 Sept 2006, 7:42 p.m.
In case you're wondering about the title, this is kind of a little challenge: try to find the shortest RPN keystroke sequence that makes the 42S display 42.4242424242, assuming the display mode is STD or at least FIX 10. Simply keying the number in would require 13 keystrokes, so only solutions up to 12 keystrokes would count. I have found a 7-keystroke sequence which has the additional advantage to be almost universal: if your calculator of choice is the HP-41 you'd be able to use the same number of keystrokes to display 41.41414141 on it. And so to display 15.15151515 on your 15C, and 12.12121212 on your 12C, and so on.
A variation would be considering the calculator in its initial power-on state. In the case of the HP-41 it defaults to FIX 4. So we'd like to display 41.4141 instead as shift FIX 9 would require three more keystrokes, which would spoil the fun. Of course displaying 41.4141 would require at least 8 keystrokes (ENTER is needed to hide the cursor). Interesting solutions should have 7 keystrokes at most. For instance, the 5-keystroke sequence 2 SQRT 40 +would be a nice solution if it returned 41.4141 rather than 41.4142.
I came across the more general solution in less than ten minutes, which makes me guess this is a very easy challenge after all (or I was just lucky). The other solutions might be more interesting in case you're willing to try (so far I don't have any).
Best regards,
Gerson.
|