Quote Originally Posted by Kato View Post
Since we're limited to whole numbers, how efficient would be asking for divisibility? Is it divisible by 2 / 3/ 4... Skipping obviously wrong questions. (which is mostly just a way to get the binary approach to normal numbers) Is it much worse than other techniques?
I think prime numbers would be best if you are looking at factors. Maybe something like:
  1. Is the number divisible by prime p?
  2. If Yes: store p and ask about two again, If no:
  3. Is the next prime large than the number? If so: break. (There is probably a smaller end condition that could be used).
  4. Is the number divisible by the next prime? Goto step 2


It takes iterations equal to amount of the number's prime factors + the number of primes less than the number that are not prime factors.

—Caerulea