PDA

View Full Version : [Mathematica] Combining statements


martix
Jul25-11, 03:03 PM
FromDigits /@ Permutations[Range[9], {4}]

MapThread[Power, Transpose [FactorInteger[1234]]]

MapThread[Power, Transpose [FactorInteger[#]]] &[FromDigits /@ Permutations[Range[9], {4}]]

Expression 1 and 2 work, so why not 3???

General goal:
Find the factors of all permutations of the digits 1-9 with length 4(with the factors raised to their respective powers).

CompuChip
Jul25-11, 04:08 PM
Shouldn't it be:
MapThread[Power, Transpose [FactorInteger[#]]]& @ (FromDigits /@ Permutations[Range[9], {4}])
?

martix
Jul25-11, 05:29 PM
Indeed it should :) Thanks.
Minor mistake:
MapThread[Power, Transpose [FactorInteger[#]]]& /@ (FromDigits /@ Permutations[Range[9], {4}])