[VA] Short & Sweet Math Challenge #24: "2019 Spring Special 5-tier"
|
03-21-2019, 12:30 PM
(This post was last modified: 03-21-2019 01:50 PM by Paul Dale.)
Post: #3
|
|||
|
|||
RE: [VA] Short & Sweet Math Challenge #24: "2019 Spring Special 5-tier"
I'm not sure why but tier 3 and tier 4 look like the easiest.
Spoilers towards the end. Anyway, a 24 step program for tier 3 for the HP 25: 01 CLREG 02 1 03 x<>y 04 x=0? 05 GTO 24 06 2 07 / 08 INT 09 LASTx 10 FRAC 11 x=0? 12 GTO 17 13 Rv 14 x<>y 15 STO+ 0 16 GTO 19 17 Rv 18 x<>y 19 1 20 e^x 21 * 22 x<>y 23 GTO 04 24 RCL 0 For the Pi flavour, change steps 19 and 20 to: Pi and NOP. The 1,000,000th term is 278,394,443.2 and the 3,141,593rd term is 1,601,007,657. Both in several seconds on a real 25. The 1,234,567th term for Pi is 9,091,632,462 and the 2,718,282nd term is 30,446,503,22x (x being beyond the accuracy of the 25). Again, fairly quickly. The key observation being that: $$ \sum_{i=0}^n e^i = \frac{e^{n + 1} - 1}{e - 1} < e^{n + 1} $$ which means that the position expressed in binary determines the powers used. Note that 21 + 23 + 24 = 26 and 20 + 22 + 23 + 24 + 25 = 61 and compare to the initial examples. Larger bases also have this property. I didn't try to prove that e is the smallest base for which this holds true, which is good because the smallest base is, unsurprisingly, two. Pauli |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)