Quickest way to find if the prime factors of a number consist of only 2s and 3s

69 Views Asked by At

Is there any way besides manually factorizing a number to determine the above fact in the quickest way possible?

1

There are 1 best solutions below

0
On

Keep dividing by $2$ until the number is odd, then keep dividing by $3$ until the number is not divisible by $3$.