Lucky and even lucky numbers: Difference between revisions

Content added Content deleted
(added a draft task: lucky and even lucky numbers.)
 
(added some links (for see also).)
Line 1: Line 1:
{{draft task}}
{{draft task}}
'''definition of lucky numbers'''


''Lucky numbers'' are positive integers that are formed by:
''Lucky numbers'' are positive integers that are formed by:
Line 15: Line 16:
:* take the 6<sup>th</sup> number ···
:* take the 6<sup>th</sup> number ···
<br>
<br>
'''definition of even lucky numbers'''

''Even lucky numbers'' are positive even integers that are formed by:
''Even lucky numbers'' are positive even integers that are formed by:
:* take a list of all the positive even integers
:* take a list of all the positive even integers
Line 27: Line 30:
:* remove every 12<sup>th</sup> number
:* remove every 12<sup>th</sup> number
:* take the 6<sup>th</sup> number ···
:* take the 6<sup>th</sup> number ···
<br>The task's requirements are:


'''task requirements'''
* write one or two subroutines (functions) to generate ''lucky numbers'' and ''even lucky numbers''
* write one or two subroutines (functions) to generate ''lucky numbers'' and ''even lucky numbers''
* which kind of numbers and which number(s) will be specified via the command line or a similar interface.
* which kind of numbers and which number(s) will be specified via the command line or a similar interface.
Line 66: Line 69:
* show the 10,000<sup>th</sup> ''lucky'' number (extra credit)
* show the 10,000<sup>th</sup> ''lucky'' number (extra credit)
* show the 10,000<sup>th</sup> ''even lucky'' number (extra credit)
* show the 10,000<sup>th</sup> ''even lucky'' number (extra credit)
<br>

'''see also'''
* This task is related to the [[Sieve of Eratosthenes]] task.
* Sequence [https://oeis.org/A000959 A000959 lucky numbers] on The On-Line Encyclopedia of Integer Sequences.
* Sequence [https://oeis.org/A045954 A045954 even lucky numbers or ELN] on The On-Line Encyclopedia of Integer Sequences.
* Entry [http://mathworld.wolfram.com/LuckyNumber.html lucky numbers] on The Eric Weisstein's World of Mathematics.
<br>
<br>