Post Reply 
Programming puzzle: Longest list of regular numbers?
01-13-2021, 06:39 PM (This post was last modified: 01-14-2021 06:53 AM by C.Ret.)
Post: #31
RE: Programming puzzle: Longest list of regular numbers?
(04-18-2017 07:22 PM)Han Wrote:  
(04-18-2017 07:13 PM)pier4r Wrote:  Just saw this: http://www.hpmuseum.org/forum/thread-8201.html

Han, how does the Prime performs?

I do have a Ti89, but I did not use it for years and refreshing the Ti basic now is a no go.

Using the TEVAL command, the hardware calculator returns 0.828 seconds for the 1429-th Hamming number.

And it takes the Prime 133.468 seconds to compute the 9733-rd value. I created a CAS equivalent function in order to handle larger numbers, which ran slightly slower (3.167 seconds) than the non-CAS version when computing the 1429-th value.

I am sorry being outlaw for the challenge; I am off by one unit since I start counting the Hamming Numbers from H(1)=1 in order to be consistant with what was done in another (french) forum.

Using a regular HP Prime in Cas-mode, I get the following results all in less than one second using less than 5% the potential power of the method (mainly limited by no more than 10 000 elements in a regular list).


1429th \(H_{1430}\; = \;2^{11}\,.\,3^{10}\,.\,5\;=\;604661760\; = \;6.0466\,10^8\) ( 166_ms 1.38%_mem)

9733th \( H_{9734}\; = \;2^{30}\,.\,3^{10}\,.\,5^{5}\; = \;198135565516800000\; = \;1.9814\,10^{17}\) ( 575_ms 4.88%_mem)

14999th \(H_{15000}\; = \;2^{45}\,3^{2}\,5^8\; = \;123695058124800000000\; = \;1.237\,10^{20}\) ( 793_ms 6.46%_mem)

https://drive.google.com/file/d/1sMIh5s5...sp=sharing

Next, I compute the 900000th in exactly one minute and ten seconds (using 99.75% of available list's memory), can any one check my result ?

900000th
\( H_{900001}\; = \; 2^{109}\,3^{83}\,5^{12} \; = \; 63237358572568057903168577690859215941320256664938047927726400497254400000000000​0 \; = \; 6.3237\,10^{80} \) ( 1.1_min 99.75%_mem)

Unfortunately, computing the 1E6th is impossible due to a limited list capacity but was expected in less than two minutes.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzle: Longest list of regular numbers? - C.Ret - 01-13-2021 06:39 PM



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