Re: n-ary representation and divisibility
- From: dwarfppe2004@xxxxxxxxxxxxxx (Ulysse Keller)
- Date: Mon, 30 May 2005 15:43:21 GMT
On 30 May 2005 06:44:52 -0700, "krill" <krillqill@xxxxxxxxxxx> wrote:
>
>Recently I have an observation about algorithms on divisibility of
>integers by prime numbers. People have developed many of these, e.g.
>
>(1)For p=3: add up all digits and see if the sum divides by 3.
>
>(2)(...)
>(3)(...)
>
>But we perform all these algorithms mostly under decimal representation
>of the integer. What about for different n-ary representation?
>
>I find that: For integer a and fixed prime p, if we write a into m-ary
>representation, where m and 10 are congruent mod p, then the same
>algorithm that works under decimal representation, could still applies
>for m-ary representation of a. I've checked tens of numbers and the
>first several primes, and the conclusion goes true, but i dont know how
>to prove it or disprove it.
>
>Could anyone help me?
>
As you present it, the proof will have to be made separately for each
rule, but you should be able to imitate from the simplest case (above)
The reason why a number in decimal form is divisible by 3 iff the sum
of its digits is divisible by 3 is that: 10 is congruent to 1 mod 3,
therefore all powers of 10 are congruent to 1 mod 3, therefore
replacing a_i * 10^i in a decimal number "a_n ... a_i ... a_2 a_1 a_0"
i.e. a_0 + a_1 * 10 + a_2 * 10^2 + ... + a_i * 10^i + ... + a_n * 10^n
by a_i (in this sum) will not change (the class of) the number mod. 3
The same rule will be valid for any number base m congruent to 1 mod 3
which is the same as congruent to 10 mod 3.
(The primality of p=3 is not essential. The same is done with p'=9.)
You can get more such results in bases different from 10 if you find
out the reason of such a rule and generalize the reasoning, e.g.
A hexadecimal number (base 16) is divisible by 5 iff the sum of its
digits is divisible by 5 (because 16 is congruent mod 5 to 1)
.
- References:
- n-ary representation and divisibility
- From: krill
- n-ary representation and divisibility
- Prev by Date: Re: analytic continuation of prime number function
- Next by Date: Re: form equation takes at large value of time
- Previous by thread: n-ary representation and divisibility
- Next by thread: Re: n-ary representation and divisibility
- Index(es):
Relevant Pages
|