If a triple is defined as (a,b,c) such that $a \times b \times c = n$
What is the best way to find these triples for a given $n$
(1,2,3) is the same triple as (3,2,1) as is (2,1,3) etc..
I need to write some code to find all possible triples for $n$ and I could just try it for every number. However, since $n$ while range from $1$ to $2 \times 10^9$ this program will get very slow very quick for larger numbers
First you want to find the prime factorization of $n$. With your limit you only need a list of primes up to $\sqrt{2\cdot 10^9}\approx 45,000$ Now assume you have $n=p^dq^er^f$ where $p,q,r$ are prime. You need to form all the partitions of $d,e,f$ into three parts. Say $a=5$, then the partitions are $(5,0,0),(4,1,0),(3,2,0),(3,1,1),(2,2,1)$ Those are the ways to distribute the factors of $p$ among $a,b,c$. You can pick one prime, probably the one with highest exponent and use the list of partitions. For all the other primes you will have to use each partition in all its orders. Multiply them all to get the factorizations. Finally you need to check for duplicates.
For example, let $n=96=2^5\cdot 3^1$. There is only one partition of $1$ into three parts, $(1,0,0)$ but we need to consider $(0,1,0)$ and $(0,0,1)$ as well. Combining these in all ways we get $$\begin {array} {c|c c c} &(1,0,0)&(0,1,0)&(0,0,1)\\ \hline (5,0,0)&96,1,1&32,3,1&32,1,3\\(4,1,0)&48,2,1&16,6,1&16,2,3\\ (3,2,0)&24,4,1&8,12,1&8,4,3\\ \end {array}$$ and so on. Note the repetition in the first line. It can happen when one partition has multiple equal entries.