EKG sequence convergence: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Added stretch goal (plus a bonus case converging all EKGs), and updated to new task spec.)
(→‎{{header|Python}}: Moved to example it applies to.)
Line 304: Line 304:


=={{header|Python}}==
=={{header|Python}}==
{{incorrect|Python|EKG(10) produces: EKG(10): 1, 2, 4, 6, 3, 9, 12, 8, 10, 5}}
===Python: Using prime factor generation===
===Python: Using prime factor generation===
{{incorrect|Python|EKG(10) produces: EKG(10): 1, 2, 4, 6, 3, 9, 12, 8, 10, 5}}
<lang python>from itertools import count, islice, takewhile
<lang python>from itertools import count, islice, takewhile
from functools import lru_cache
from functools import lru_cache