Moderators: gmalivuk, Moderators General, Prelates
Jerry Bona wrote:The Axiom of Choice is obviously true; the Well Ordering Principle is obviously false; and who can tell about Zorn's Lemma?
mfb wrote:Tests for divisions (with a number expressed in a given base b=\prod p_i^{a_i} with distinct primes pi) are always easy for divisors d=\prod p_i^{b_i} which are a product of (only) prime factors present in the base, and quite easy for (base+1) and (base-1).
In the former case, you just have to check the last n digits, where n=\max_i{\left[\frac{b_i}{a_i}\right]}, unless I made a mistake here.
For base-1, calculate the digit sum, and for base+1, calculate the alternating digit sum and check whether they are 0 or not.
With all other divisors, there is an equivalent to the digit sum, but with different weights for each digit. Needs a bit more calculations, but it is easy to do in linear time (with the length of the number).
Users browsing this forum: Bakstoola and 6 guests