Hello.

I’m having trouble finding an efficient way to calculate all possible combinations from a set of vectors.

When they are small using kron[a,b,c] where a,b and c are vectors yields good results but the problem occurs when the vectors get big or there are simply more of them resulting in overflow.

Simple example for the problem is calculating all possible multiplications of primes lower than 6 up to 100.

Another example: all possible multiples from set of vectors [1,2,3] , [5,2,7] , [2,4,8,16]

Those problems are easy to brute force but when you scale them up it proved to be sort of a problem to me. so I’m open for suggestion about useful algorithms. And thanks