I can use any language right? How about MATLAB ;)
But here's a haskell solution just for fun:
prime_factors :: Int -> [Int]
prime_factors 1 = 
prime_factors n = next_factor : (prime_factors $ div n next_factor)
where next_factor = head [i | i <- [2..n], 0 == mod n i]
decomp :: Int -> [Int]
decomp = sort . decomp'
decomp' 1 = 
decomp' n = prime_factors n ++ decomp' (n - 1)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.