public static int[] factor(int n,
int[] fromfactors)
Return the prime factors of n.
The method first extracts any factors in fromfactors, in order (which
needn't actually be prime). Remaining factors in increasing order follow.
log2
public static int log2(int n)
Return the integer log, base 2, of n, or -1 if n is not an integral power of 2.