[Mathematica] Combining statements

  • Context: Mathematica 
  • Thread starter Thread starter martix
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion focuses on the Mathematica implementation of combining statements to find the factors of all permutations of the digits 1-9 with a length of 4. The correct approach involves using the expression MapThread[Power, Transpose[FactorInteger[#]]]& /@ (FromDigits /@ Permutations[Range[9], {4}]). The initial expressions provided were evaluated, but the third expression failed due to a minor mistake in syntax. The participants confirmed that the intended method should yield the desired results.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of permutations and combinatorial mathematics
  • Knowledge of the FactorInteger function in Mathematica
  • Experience with mapping functions in functional programming
NEXT STEPS
  • Explore the use of FromDigits in Mathematica for converting lists to numbers
  • Learn about Permutations and its applications in combinatorial problems
  • Investigate the FactorInteger function and its output structure in Mathematica
  • Study the MapThread function for advanced data manipulation in Mathematica
USEFUL FOR

This discussion is beneficial for Mathematica users, mathematicians, and programmers interested in combinatorial mathematics and factorization techniques. It is particularly useful for those looking to optimize their use of Mathematica for complex mathematical computations.

martix
Messages
167
Reaction score
5
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).
 
Physics news on Phys.org
Shouldn't it be:
MapThread[Power, Transpose [FactorInteger[#]]]& @ (FromDigits /@ Permutations[Range[9], {4}])
?
 
Indeed it should :) Thanks.
Minor mistake:
MapThread[Power, Transpose [FactorInteger[#]]]& /@ (FromDigits /@ Permutations[Range[9], {4}])
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 6 ·
Replies
6
Views
5K
Replies
3
Views
3K