Elementary Number Theory Study Note one: The concept of divisible Division and band remainder

Source: Internet
Author: User

The definition of divisible: A, B is two arbitrary integers, b!=0, if there is an integer q, so that A=b*q, said "A can be divisible by B", or "B can be divisible by a", or "B is a factor", or "A is a multiple of B", with the notation "B|a".

The nature of the divisible:
(1) b|0, because 0=b*0
(2) 1|a, because a=1*a
(3) B|a <=> b| ABS (a)
(4) a|b, b|c = A|c, because a|b,b|c = B=A*Q1,C=B*Q2 = c=a*q1*q2

The theorem 1:a is the same as that of ABS (a).
Because 6=1*6=2*3= (-1) * (-6) = (-2) * (-3), the factor of 6 is 1,-1,2,-2,3,-3,6,-6.
All the constraints of + A and abs (a) are the same because a=b*q <=> a = (-B) * (-Q).
The approximations of a and a are in pairs, b|a <=>-b|a, because the factors are in pairs, so only positive factors are discussed in the usual discussion.

Theorem 2:a,b are integers, which are multiples of M, then a+b,a-b are multiples of M.

Theorem 3: If A1,a2,..., An is a multiple of M, then Q1*a1+q2*a2+...+qn*an is a multiple of M.

Theorem 4 (with remainder division): If A, B is a two integer, b>0, there are two integer q,r, which makes
A=b*q+r
Among them 0<=r<b, and, Q,r is the only.
such as: When A=16,b=5,16=5*3+1
When a=-16,b=5,-16=5* ( -3) -1=6* ( -3) +2 = 16 divided by 5 the remainder is 2
When a=20,b=6,20=6*3+2
When a=-20,b=6,-20=6* ( -3) -2=6* ( -4) +4 = 20 divided by 6 the remainder is 4
A= B*q+r
-a= b* (-Q)-R
(when r=0) = b* (-Q)
(when r!=0) = b* (-q-1) +b-r
Note: Running -16/5=-3,-16%5=-1 in the GCC compiler of MINGW is not the same as the theory.
Proof: Do integer series ..., -3b,-2b,-b,0,b,2b,3b,...
Presence Q makes q*b<=a< (q+1) *b
Make r=a-q*b, then A=q*b+r
r>=0,q-q*b-b<0 = A-q*b<b = R<b
= 0<=r<b
Set A=B*Q1+R1, 0<=r1<b
B (q-q1) +r-r1=0,b (Q-Q1) =r1-r
B*abs (Q-Q1) =abs (R-R1) <b, if Q-q1!=0,b*abs (q-q1) >=b = ABS (R-R1) >=b
And because 0<=r<b =-b<r-r1<b = ABS (R-R1) <b
= = r = R1

Inference: If a, B is a two integer, there are two integer q,r, which makes
A=b*q+r
where 0<=r<abs (b), and Q,r is unique.

With the remainder division A=b*q+r,0<=r<b, Q is called a divided by B of the incomplete quotient, R is called a divided by B.

Elementary Number Theory Study Note one: The concept of divisible Division and band remainder

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.