Displaying 1 result from an estimated 1 matches for "smallfacs".
2009 Feb 24
3
All the products of common factors
This is a seemingly simple problem - hopefully someone can help.
Problem: we have two integers. We want (1) all the common factors, and
(2) all the possible products of these factors. We know how to get (1),
but can't figure out a general way to get (2).
Example: 40 and 80 have these factors: c(1,2,2,2,5) and c(1,2,2,2,2,5).
We can use match() to get the common factors c(1,2,2,2,5). What