Programming puzzle: Longest list of regular numbers?
|
04-17-2017, 07:53 PM
Post: #22
|
|||
|
|||
RE: Programming puzzle: Longest list of regular numbers?
Nice code Han! As pier4r says, our sequences begin with two.
I looked at examples from oeis and I attacked Challenge 2 with the first Mathematica code, just changing the range to 604661760 since we already know it's the 1429th number (or 1430th, counting from one). Using the built-in EulerPhi[] function in a loop isn't a recipe for an efficient calculation, so the execution time won't surprise you: 6383 seconds (1 hour 46 minutes) on a fairly modern dell laptop. Han's hp48 calculation was over 30 times faster than this! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)