Use divisibility, prime factorisation and remainders to reason about integers before doing long calculations.
- N
- Integer being divided.
- d
- positive integer divisor.
- q
- Quotient.
- r
- remainder: N = dq + r, with 0 ≤ r < d.
Division algorithm
d is positive; q and r are integers.
Even and odd
k is an integer; odd + odd is even.
Divisibility by 3 or 9
Divisible by 3 or 9 exactly when the digit sum is.
Divisibility by 4 or 8
For 4 use the last two; for 8 the last three.
Count positive divisors
Use distinct primes; N > 1. The number 1 has one positive divisor.
Last digit of a power
For exponent ≥ 1; remainder 0 selects the last entry of the cycle.
Explanations and worked examples
Open a method when you need more detail.
Full notation guide
- N
- Integer being divided.
- d
- positive integer divisor.
- q
- Quotient.
- r
- remainder: N = dq + r, with 0 ≤ r < d.
- pᵢ
- Distinct primes.
- aᵢ
- positive integer exponents in a prime factorisation.
- τ(N)
- Number of positive divisors of the positive integer N.
- n
- A positive integer count or exponent, as stated.
1. Use the quotient–remainder form
For a positive divisor d, every integer N has a unique integer quotient q and remainder r with 0 ≤ r < d. This restriction matters when interpreting negative dividends.
Worked example
Find the remainder when −17 is divided by 5 using the nonnegative-remainder convention.
- −17 = 5 × (−4) + 3.
- The remainder 3 lies between 0 and 4.
3.
Remember
- Some programming languages use a signed remainder convention; these notes use the mathematical nonnegative remainder.
2. Track parity without calculating everything
Even numbers are multiples of 2. The sum of two odd numbers is even; a product is odd exactly when every factor is odd.
Worked example
If n is an integer, must n(n + 1) be even?
- Two consecutive integers contain one even number.
- Their product therefore contains a factor of 2.
Yes, always even.
Remember
- Zero is even. Checking examples illustrates a rule but does not replace the consecutive-integer argument.
3. Apply digit-based divisibility tests
For 2 or 5, inspect the last digit. For 3 or 9, use the digit sum. For 4 or 8, inspect the last two or three digits. For 11, the alternating digit sum must be a multiple of 11, including zero.
Worked example
Check whether 7,128 is divisible by 9 and by 8.
- Digit sum = 7 + 1 + 2 + 8 = 18, divisible by 9.
- Last three digits = 128, divisible by 8.
It is divisible by both 9 and 8.
Remember
- Divisibility by two factors guarantees divisibility by their product only when those factors are coprime. For example, divisibility by 4 and 6 alone does not guarantee divisibility by 24.
4. Factor into primes and recognise squares
A prime is an integer greater than 1 with exactly two positive divisors. Every integer greater than 1 factors uniquely into primes up to order. A perfect square has even prime exponents; a perfect cube has exponents divisible by 3.
Worked example
What is the smallest positive integer multiplier that makes 72 a perfect square?
- 72 = 2³ × 3².
- Only the exponent of 2 is odd, so multiply by 2.
- 72 × 2 = 144 = 12².
2.
Remember
- The number 1 is neither prime nor composite. Do not confuse a prime factor with an arbitrary divisor.
5. Count divisors from exponent choices
A divisor independently chooses an exponent from 0 through aᵢ for each prime pᵢ. Multiplying the numbers of choices gives the divisor count.
Worked example
How many positive divisors does 360 have?
- 360 = 2³ × 3² × 5¹.
- Choices for exponents: 4, 3 and 2.
- Number of divisors = 4 × 3 × 2 = 24.
24 positive divisors.
Remember
- This counts both 1 and N and excludes negative divisors. A perfect square has an odd positive-divisor count.
6. Use last-digit cycles
Multiplication modulo 10 creates repeating last-digit cycles. List a complete cycle before reducing the exponent by its length. A zero exponent is a separate case for a nonzero base.
Worked example
Find the last digit of 7^2026.
- The cycle length is 4.
- 2026 leaves remainder 2 on division by 4.
- Choose the second cycle entry, 9.
9.
Remember
- If the exponent remainder is 0, use the last cycle entry, not an invented entry zero.