Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[Mathematica] Combining statements

  1. Jul 25, 2011 #1
    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).
     
  2. jcsd
  3. Jul 25, 2011 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    Shouldn't it be:
    MapThread[Power, Transpose [FactorInteger[#]]]& @ (FromDigits /@ Permutations[Range[9], {4}])
    ?
     
  4. Jul 25, 2011 #3
    Indeed it should :) Thanks.
    Minor mistake:
    MapThread[Power, Transpose [FactorInteger[#]]]& /@ (FromDigits /@ Permutations[Range[9], {4}])
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook