The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Programming puzzle: Longest list of regular numbers?
04-16-2017, 03:02 PM (This post was last modified: 04-16-2017 03:04 PM by pier4r.)
Post: #1
Programming puzzle: Longest list of regular numbers?
Description:
A regular number is a number that divides evenly a power of 60 (so at least one of the following numbers 60, 3600, 216000, \( 60^4 \) , \( 60^5 \) and so on)

Challenge #1:
Print on the screen all the regular numbers found in 120 seconds without gaps (so, without focusing on a subset of the regular numbers. One has to return consecutive regular numbers). If the program fails to produce any regular number after 120 seconds (unlikely, since the first is 2), one can just report the first regular number found and how much time was needed.
Note: No quick start allowed. One has to start from 2.

For example by hand using my el506w as support (or using the properties of regular numbers, those are faster to apply mentally) I can do this in 120 seconds:

2,3,4,5,6,8,9,10,12,15,16,18,20

Challenge #2 (longer):
Find the 1429th regular number, return the time needed for the computation (I'm not sure if this would stretch thin some old calculators).
Note: No quick start allowed. One has to start finding numbers from 2.

Challenge #2a (for very fast hw/solutions):
Like #2, but one has to find the 9733rd regular number. (for computers, one has the original challenge that raises the bar a bit)

Source of the idea.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Programming puzzle: Longest list of regular numbers? - pier4r - 04-16-2017 03:02 PM



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