ΘρϵηΠατπ

Quotient Remainder
Suppose that a,b, but that b0, then there exists unique integers q,r such that a=bq+r where 0r<|b|

Let a,b and assume b0. Define S={x:x0 and x=a+|b|k where k}0, we'll show that S is non-empty. We can think of S as taking a and then either adding muliples of |b| or subtracting them to a, each time leaving some remainder, thinking ahead we can guess that the smallest value of this set should be the smallest remainder and possibly the r we are looking for.

If a0 then when k=0 we have a+|b|k=a0 thus aS, on the other hand if a<0, then observe that since 0r<|b|, then 1|b|0|b|1 and also a>0, then we have 0(|b|1)(a). But also we can see that (|b|1)(a)=|b|(a)+a so it's of the form of an element in S and since it's non-negative, it must be an element of S. Therefore this paragraph shows us that S has at least one element, no matter the value of a.

Due to this and since S0, then by the well ordering principle there is some smallest element sS, we know that this value satisfies s=a|b|k. Now we will show that 0s<|b|.

sS so therefore s0, if we were to assume that s|b| then s|b|0. By recalling the equality that s satisifies we can write s|b|=(a|b|k)|b|=a|b|(k+1), therefore s|b|S but since |b|>1 then s|b|<s which is a contradiction because we assumed that s was the smallest element in S, thus we must have that s<;|b|

At this point we have a=|b|k+s where 0s<|b| so take q=sgn(b)k and r=s. If b0, then |b|=b and sgn(b)=1, so we obtain a=bk+s, if b<;0, then |b|=b and sgn(b)=1 so again we have a=(b)(1)k+s. We'll finish the proof by showing that these values are unique.

Assume we have another pair q,r satisfying a=bq+r with 0r|b| but qq and rr, therefore we have bq+r=bq+rrr=b(qq).

Without loss of generality assume r>r, then rr>0 and since 0r<|b| then 0rrr<|b|, recalling that rr=|b|(qq), we can re-write our last inequality as 0|b|(qq)<|b| and since b0 we can divide by |b| to get 0<qq<1 but since q,q this force q=q, which then shows r=r by previous equalities, therefore assuming we have another solution, it turns out it must be our original one, and thus our solution is unique.

Note that the requirement that b be non-zero is important, because if it were zero we'd be asking "how many times do you have to multiply 0 and add r to get a" which in itself doesn't intuitively make sense, formally since we require 0r<|b| then if b=0 no such r could ever exist.

Remainder Function
Given two integers a,b such that b0, then we get some q,r with 0r<|b| such that a=bq+r and we define a % b:=r
Quotient Function
Given two integers a,b such that b0, then we get some q,r with 0r<|b| such that a=bq+r and we define a // b:=q
Quotient Remainder using Quotient and Remainder Function
For any a,b such that b0 then a=b(a//b)+a % b
Specific Value of the Divisor Function
We note that a // b=ba
Specific Value of the Remainder Function
We note that a % b=bbaa
Quotient Remainder on Positive Integer has Positive Divisor
Suppose that a,b1 such that ab then a//b1

For brevity define q=a//b, we know that a=bq+r with 0r<b, thus far we know that q, though if q<;0, then we know that bq<;rq0, therefore a=bq+r<;rq+r=r(q+1)

For a contradiction assume that q<1q0, therefore r(q+1)r(0+1)=r, which shows that a<r, since 0r<b, then we have a<b which is a contradiction because we know that ab.

Since by assuming q<1, we have a contradiction, so therefore q1, which is the same as a//b1.

Divides iff Zero Remainder
For any a,b a|ba % b=0
Note that a|b iff b=ka=ka+0 iff a // b=k and a % b=0. The last iff comes from the fact that there are unique integers that satisfy the equation laid out by the quotient remainder theorem.
Every integer is either Odd or Even
For any z, it is even or it is odd
Let z and then we know that z % 2{0,1}, if z % 2=1 then there is some q such that z=q2+1, and thus odd, if z % 2=0, then we have some q such that z=q2+0 and is thus even
Exactly one of any two Consecutive Numbers is Even
For any n exactly one of n,n+1 is even (and the other odd)
If n is even, we are done, if n is odd, then there is a k such that n=2k+1 therefore n+1=2(k+1) which is even as needed.
When the Remainder Function does Nothing
Suppose that m1 and that a[0,,m1] then a % m=a
Remainder of Sum Less Than First Summand When Sum Exceeds Modulus
Suppose that n1 and a,b[0,,n1] such that a+bn, then (a+b) % n<a

Since an1 and bn1 we have a+b2n2, combined with our assumption that a+bn we obtain na+b2n2 and therefore 0a+bnn2<n succinctly: 0a+bn<n and since we know a+b=n+(a+bn) then by quotient remainder we conclude (a+b) % n=a+bn

Another way of seeing the above is that (a+b) % n=a(nb), and this is a better form because if we knew that nb>=1 then we could conclude that (a+b) % n<a, but we did know that b[0,,n1] therefore bn1 which yields nb1 as needed.

Repeated Application of the Remainder Function does Nothing
Suppose that a,m such that m0 then a % m=(a % m) % m
Quotient Remainder and Addition
Suppose that a,b,m then (a+b) % m=((a % m)+(b % m)) % m and (a+b)//m=a//m+b//m+(a % m+a % b)//m
We know a=m(a//m)+a % m and b=m(b//m)+b % m therefore a+b=m((a//m)+b//m)+(a % m+b % m) Let x=(a % m+b % m), and so by the quotient remainder theorem we get some qx,rx such that x=mqx+rx so that a+b=m((a//m)+(b//m)+qx)+rx therefore (a+b) % m=rx and (a+b)//m=(a//m)+(b//m)+qx. Finally note that rx=(a % m+b % m) % m and qx=(a % m+b % m)//m as needed.
If a Number Divides a Sum and Already Divides one of the Summands it Must Divide the Other
Suppose that d|a+b and d|a then d|b
We know that (a+b) % d=0 and that a % d=0 since 0amp;=(a+b) % damp;=(a % b+b % d) % damp;=(0+b % d) % damp;=b % d therefore d|b
Adding Multiples of the Divisor Never changes the Remainder
Let m0 and a,k then a % m=(a+km) % m
n Factorial Plus or Minus One Restricts Factors
Suppose n1 then for every m[2,,n] mn!±1
Recall that m|n! therefore n! % m=0. But then (n!±1) % mamp;=(n! % m±1 % m) % mamp;=(±1 % m) % mamp;=±1 % m Note that in going from the second to the third line we used this fact.

if ±=+ then we have (n!+1) % m=1 otherwise we have (n!+1) % m=1 % m=m1 and since m1 then m10 therefore in both cases we see that (n!+1) % m0 therefore m(n!+1) as needed.

Every Perfect Square has Remainder Zero or One Upon Division by Four
For any n we have n2 % 4{0,1}
We know that n is either odd or even and therefore in the case that n=2k then n2=4k2=2(2k2)+0 so n2 % 4=0, on the other hand if n=2k+1 then n2=4k2+4k+1=2(2k2+2k)+1 therefore n2 % 4=1 as needed.

Note that we also see that every odd perfect square has remainder 1 mod 8 as an intermediate stage in the above proof.

Every Odd Perfect Square has Remainder 1 mod 8
As per title.
Suppose that n2=2k+1 it's impossible for n to be even, because then n2 would be, since every number is either even or odd, then n must have been even, therefore there is a j such that n=2j+1 therefore n2=4j2+4j+1=4(j(j+1))+1. Recall that at least one of j,j+1 is even , therfore j(j+1) is even and therefore 4(j(j+1)) is divisible by 8 in other words we have some m such that n2=8m+1 as needed.
composite number
A number n1 is said to be composite, when it has a positive divisor other than 1 and itself
multiplicative function
an arithmetic function is said to be multiplicative when
f(m)f(n)=f(mn)
for all coprime positive integers m,n
Suppose that d(n) is the number of divisors of n, then d is a multiplicative function.

Let m,n+ and assume that gcd(m,n)=1, we'd like to prove that d(m)d(n)=d(mn)

Suppose that the divisors of m are P={p1,,pj} and the divisors of n are Q={q1,,qk}

Claim that the set PQ={pxqy:x[j],y[k]} is exactly equal to the divisors of mn