OFFSET
1,1
COMMENTS
Each factorization is given in nondecreasing order. To determine which of two factorizations a_1 * a_2 * ... * a_r and b_1 * ... * b_s (of the same number) comes first, find the smallest index k such that a_k != b_k. If k=r then the a-factorization comes first. If k=s the b-factorization comes first. Otherwise, if a_k < b_k then the a-factorization comes first; if b_k < a_k the b-factorization comes first.
LINKS
Donald S. McDonald, Posting to sci.math newsgroup, Feb 07 1999
EXAMPLE
The first 20 terms come from the factorizations of 4, 6, 8, 9, 10 and 12: 4 = 2*2, 6 = 2*3, 8 = 2*4 = 2*2*2, 9 = 3*3, 10 = 2*5, 12 = 2*6 = 2*2*3=3*4.
MATHEMATICA
mf[1, ds_] := {{}}; mf[n_, {}] := {}; mf[n_, ds_] := mf[n, ds]=If[Mod[n, ds[[1]]]==0, RotateRight[Join[Prepend[ #, ds[[1]]]&/@mf[n/ds[[1]], ds], RotateLeft[mf[n, Drop[ds, 1]]]]], mf[n, Drop[ds, 1]]]; mf[n_] := mf[n, Drop[Divisors[n], 1]]; Flatten[Drop[mf[ # ], 1]&/@Range[50]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Donald S. McDonald, Oct 26 2002
EXTENSIONS
Edited by Dean Hickerson, Dec 06 2002
STATUS
approved