← RoseCode

ROSECODE 237

Smooth factorisation

Philippe_57721 · Programming ·

Let's define a smooth factorization of n! as n!=f1×f2××fn with :
fifi+1
fn=the largest prime factor of n!

Examples:
13!=2×3×3×5×5×6×6×6×7×8×8×11×13
=3×4×4×4×5×5×6×6×6×6×7×11×13
14!=4×4×4×4×4×5×5×6×7×7×9×9×11×13

Find the last (in numeric lexicographic order) smooth factorization of 28!

Answer format: Comma separated list of factors.
Example: 5,6,6,6,6,6,6,6,6,7,7,8,8,10,10,11,13,17,19 // For 19!

[My timing: 70 sec]