PracticeVideosBlogFlashcards

2.1 Number Systems, Divisibility Rules, Prime Factorization & Remainder Theorem

Key Takeaways

  • Real numbers partition into rational and irrational sets. For an integer N>1N>1, primality testing needs prime trial divisors only through ⌊N⌋\lfloor\sqrt{N}\rfloor.

  • Divisibility rules for composite divisors M=a×bM = a \times b require testing co-prime factors where gcd⁡(a,b)=1\gcd(a, b) = 1, such as 72 (8×98 \times 9), 88 (8×118 \times 11), and 99 (9×119 \times 11).

  • Prime divisors utilize specific algorithmic checks: 7 (a−2ba - 2b), 11 (alternating sum), 13 (a+4ba + 4b), 17 (a−5ba - 5b), and 19 (a+2ba + 2b).

  • For N factored into distinct prime powers, multiply one plus each exponent to count positive divisors. Multiply each prime’s geometric-series sum to sum divisors; require a positive power of 2 when summing even divisors.

  • Advanced modular arithmetic relies on negative remainders, Fermat's Little Theorem (ap−1≡1(modp)a^{p-1} \equiv 1 \pmod p), Euler's Totient Theorem, Wilson's Theorem, and binomial algebraic expansions.

Last updated: October 2026

Mathematical practice context

The numerical railway scenarios in this guide are fictional aptitude exercises. They use the stated idealized assumptions and do not specify actual operating rules, equipment performance, tariffs, staffing norms or engineering designs.

Classification of Numbers & Set Topology

The real number system R\mathbb{R} comprises all values representing continuous quantities along the number line. It divides into two mutually exclusive sets: rational numbers (Q\mathbb{Q}) and irrational numbers (Q′\mathbb{Q}').

Number Sets & Definitions

  1. Natural Numbers (N\mathbb{N}): Counting numbers {1,2,3,4,… }\{1, 2, 3, 4, \dots\}. Natural numbers are used for discrete tallies such as the number of passenger coaches in a rake or signals in a block section.
  2. Whole Numbers (W\mathbb{W}): Natural numbers including zero {0,1,2,3,… }\{0, 1, 2, 3, \dots\}. Zero represents baseline null states, such as zero block failures during a controller's 8-hour shift.
  3. Integers (Z\mathbb{Z}): Positive and negative whole numbers along with zero {…,−3,−2,−1,0,1,2,3,… }\{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}. Integers express timetable deviations, where +4+4 indicates minutes ahead of schedule and −7-7 denotes minutes of operational delay.
  4. Rational Numbers (Q\mathbb{Q}): Any number expressible in the fractional form pq\frac{p}{q}, where p,q∈Zp, q \in \mathbb{Z} and q≠0q \neq 0. In decimal form, rational numbers either terminate (e.g., 58=0.625\frac{5}{8} = 0.625) or form an infinitely repeating periodic sequence (e.g., 411=0.36‾\frac{4}{11} = 0.\overline{36}).
  5. Irrational Numbers (Q′\mathbb{Q}'): Real numbers that cannot be represented as a ratio of integers. Their decimal expansions are non-terminating and non-repeating (e.g., 2,3,π\sqrt{2}, \sqrt{3}, \pi). For example, a square with unit-length sides has an irrational diagonal length 2\sqrt{2}.
  6. Real Numbers (R\mathbb{R}): The union of all rational and irrational numbers (R=Q∪Q′\mathbb{R} = \mathbb{Q} \cup \mathbb{Q}').
  7. Prime Numbers: Integers greater than 1 that possess exactly two distinct positive divisors: 1 and the number itself. The integer 2 is the smallest prime number and the only even prime. The number 1 is neither prime nor composite.
  8. Composite Numbers: Integers greater than 1 possessing more than two distinct positive divisors. The smallest composite integer is 4.
  9. Co-prime Numbers (Relatively Prime): Any pair of integers aa and bb whose greatest common divisor is 1, denoted as gcd⁡(a,b)=1\gcd(a, b) = 1. The individual numbers need not be primes (e.g., 8 and 15 are co-prime because gcd⁡(8,15)=1\gcd(8, 15) = 1, even though both are composite).
  10. Twin Primes: Pairs of prime numbers that differ by exactly 2, such as (3,5),(5,7),(11,13),(17,19),(29,31),(3, 5), (5, 7), (11, 13), (17, 19), (29, 31), and (41,43)(41, 43).
Number ClassificationSet SymbolDefining ConstraintOperational Railway Example
Natural NumbersN\mathbb{N}{1,2,3,… }\{1, 2, 3, \dots\}Count of freight wagons in a consist
Whole NumbersW\mathbb{W}{0,1,2,… }\{0, 1, 2, \dots\}Number of signal failures recorded on a branch line
IntegersZ\mathbb{Z}{…,−1,0,1,… }\{\dots, -1, 0, 1, \dots\}Variance from working timetable arrival times (minutes)
Rational NumbersQ\mathbb{Q}p/q,q≠0p/q, q \neq 0Ruling track gradient ratio (1/1501/150) or sectional speed
Irrational NumbersQ′\mathbb{Q}'Non-terminating, non-repeatingDiagonal of a unit square (2\sqrt{2})
Co-prime IntegersPair (a,b)(a, b)gcd⁡(a,b)=1\gcd(a, b) = 1Factor decomposition for compound divisibility testing

Primality Testing Algorithm

First reject every integer N≤1N\le1 as nonprime. For an integer N>1N>1, test primality without exhaustive trial division as follows:

  1. Find the integer floor of the square root of NN: K=⌊N⌋K = \lfloor\sqrt{N}\rfloor.
  2. Test divisibility of NN only by prime numbers less than or equal to KK.
  3. For an integer N>1N > 1, if no prime p≤Kp \le K divides NN, then NN is prime. Zero, one and negative integers are not primes.
+-----------------------------------------------------------------------------+
|                         PRIMALITY TESTING FLOWCHART                         |
+-----------------------------------------------------------------------------+
| Given Integer N > 1                                                             |
|    │                                                                        |
|    ▼                                                                        |
| Calculate K = floor(sqrt(N))                                                |
|    │                                                                        |
|    ▼                                                                        |
| List all prime numbers p <= K                                               |
|    │                                                                        |
|    ├──> Does any prime p divide N evenly (N mod p == 0)?                    |
|    │       │                                                                |
|    │       ├──> YES: N is COMPOSITE                                         |
|    │       │                                                                |
|    │       └──> NO:  N is PRIME                                             |
+-----------------------------------------------------------------------------+

Note

Mathematical Justification: Every composite number NN can be factored into a product of two integers a×b=Na \times b = N. If both factors were strictly greater than N\sqrt{N}, their product would exceed NN (a×b>N×N=Na \times b > \sqrt{N} \times \sqrt{N} = N), which is a contradiction. Thus, at least one prime factor must satisfy p≤Np \le \sqrt{N}.


Divisibility Rules from 2 to 19

Divisibility tests help check options and factor expressions without performing full long division.

DivisorDivisibility CriterionAlgebraic Test / Shortcut
2Last digit is even (0,2,4,6,80, 2, 4, 6, 8)Unit digit divisible by 2
3Sum of digits is divisible by 3∑di≡0(mod3)\sum d_i \equiv 0 \pmod 3
4Number formed by last two digits is divisible by 4 (or ends in 00)10d1+d0≡0(mod4)10d_1 + d_0 \equiv 0 \pmod 4
5Last digit is 0 or 5d0∈{0,5}d_0 \in \{0, 5\}
6Simultaneously divisible by both 2 and 3Even number and ∑di≡0(mod3)\sum d_i \equiv 0 \pmod 3
7Truncate last digit, double it, and subtract from remaining number; result is divisible by 7 (or 0)10a+b→a−2b(mod7)10a + b \to a - 2b \pmod 7
8Number formed by last three digits is divisible by 8 (or ends in 000)100d2+10d1+d0≡0(mod8)100d_2 + 10d_1 + d_0 \equiv 0 \pmod 8
9Sum of digits is divisible by 9∑di≡0(mod9)\sum d_i \equiv 0 \pmod 9
10Last digit is 0d0=0d_0 = 0
11Difference between sum of digits in odd places and even places is 0 or a multiple of 11∣∑odddi−∑evendi∣≡0(mod11)\lvert \sum_{\text{odd}} d_i - \sum_{\text{even}} d_i \rvert \equiv 0 \pmod{11}
12Simultaneously divisible by 3 and 4gcd⁡(3,4)=1\gcd(3, 4) = 1
13Truncate last digit, multiply by 4, and add to remaining number; result is divisible by 1310a+b→a+4b(mod13)10a + b \to a + 4b \pmod{13}
14Simultaneously divisible by 2 and 7gcd⁡(2,7)=1\gcd(2, 7) = 1
15Simultaneously divisible by 3 and 5gcd⁡(3,5)=1\gcd(3, 5) = 1
16Number formed by last four digits is divisible by 16 (or ends in 0000)1000d3+100d2+10d1+d0≡0(mod16)1000d_3 + 100d_2 + 10d_1 + d_0 \equiv 0 \pmod{16}
17Truncate last digit, multiply by 5, and subtract from remaining number; result is divisible by 1710a+b→a−5b(mod17)10a + b \to a - 5b \pmod{17}
18Simultaneously divisible by 2 and 9gcd⁡(2,9)=1\gcd(2, 9) = 1
19Truncate last digit, double it, and add to remaining number; result is divisible by 1910a+b→a+2b(mod19)10a + b \to a + 2b \pmod{19}

In-Depth Modular Mechanisms for Prime Divisors

For any two-part split of integer N=10a+bN = 10a + b, where bb is the units digit and aa is the truncated leading number:

  • Divisibility by 7: 10a+b≡0(mod7)  ⟺  3a+b≡0  ⟺  −4a+b≡0  ⟺  a−2b≡0(mod7)10a + b \equiv 0 \pmod 7 \iff 3a + b \equiv 0 \iff -4a + b \equiv 0 \iff a - 2b \equiv 0 \pmod 7. Example: Test 2,4292,429: 242−2(9)=224242 - 2(9) = 224; next step: 22−2(4)=1422 - 2(4) = 14. Since 1414 is divisible by 7, 2,4292,429 is divisible by 7.
  • Divisibility by 13: 10a+b≡0(mod13)  ⟺  −3a+b≡0  ⟺  9a−3b≡0  ⟺  a+4b≡0(mod13)10a + b \equiv 0 \pmod{13} \iff -3a + b \equiv 0 \iff 9a - 3b \equiv 0 \iff a + 4b \equiv 0 \pmod{13}. Example: Test 1,0141,014: 101+4(4)=117101 + 4(4) = 117; next step: 11+4(7)=3911 + 4(7) = 39. Since 39=13×339 = 13 \times 3, 1,0141,014 is divisible by 13.
  • Divisibility by 17: 10a+b≡0(mod17)  ⟺  10a+b−51b=10(a−5b)≡0  ⟺  a−5b≡0(mod17)10a + b \equiv 0 \pmod{17} \iff 10a + b - 51b = 10(a - 5b) \equiv 0 \iff a - 5b \equiv 0 \pmod{17}. Example: Test 2,2612,261: 226−5(1)=221226 - 5(1) = 221; next step: 22−5(1)=1722 - 5(1) = 17. Since 17 is divisible by 17, 2,2612,261 is divisible by 17.
  • Divisibility by 19: 10a+b≡0(mod19)  ⟺  10a+b+19b=10(a+2b)≡0  ⟺  a+2b≡0(mod19)10a + b \equiv 0 \pmod{19} \iff 10a + b + 19b = 10(a + 2b) \equiv 0 \iff a + 2b \equiv 0 \pmod{19}. Example: Test 1,0831,083: 108+2(3)=114108 + 2(3) = 114; next step: 11+2(4)=1911 + 2(4) = 19. Since 19 is divisible by 19, 1,0831,083 is divisible by 19.

Compound Divisibility: 72, 88, and 99 Rules

To test divisibility by a composite MM using two factors whose product is MM, choose a,ba,b such that gcd⁡(a,b)=1\gcd(a, b) = 1.

Warning

Testing divisibility by 24 using factors 4 and 6 is a catastrophic error because gcd⁡(4,6)=2≠1\gcd(4, 6) = 2 \neq 1. The number 36 is divisible by 4 and 6, yet 36/24=1.536 / 24 = 1.5. Divisibility by 24 requires co-prime factors 3 and 8 (gcd⁡(3,8)=1\gcd(3, 8) = 1).

Three Composite Divisor Examples

  1. Divisibility by 72 (8×98 \times 9):
    • Apply the rule for 8: The number formed by the last three digits must be divisible by 8.
    • Apply the rule for 9: The sum of all digits must be divisible by 9.
  2. Divisibility by 88 (8×118 \times 11):
    • Apply the rule for 8: The last three digits must form a number divisible by 8.
    • Apply the rule for 11: The alternating digital sum ∣∑odd−∑even∣≡0(mod11)|\sum_{\text{odd}} - \sum_{\text{even}}| \equiv 0 \pmod{11}.
  3. Divisibility by 99 (9×119 \times 11):
    • Apply the rule for 9: The total sum of digits must be divisible by 9.
    • Apply the rule for 11: The alternating digital sum must be 0 or a multiple of 11.

Canonical Prime Factorization & Factor Functions

By the Fundamental Theorem of Arithmetic, every integer N>1N > 1 can be uniquely factored into prime powers:

N=p1a⋅p2b⋅p3c⋯pkmN = p_1^{a} \cdot p_2^{b} \cdot p_3^{c} \cdots p_k^{m}

where p1<p2<⋯<pkp_1 < p_2 < \dots < p_k are distinct prime numbers, and a,b,c,…,ma, b, c, \dots, m are positive integers.

+-----------------------------------------------------------------------------+
|                     FACTOR COUNTING & SUMMATION FORMULAS                    |
+-----------------------------------------------------------------------------+
| Total Number of Factors:                                                    |
|    T(N) = (a + 1)(b + 1)(c + 1)...(m + 1)                                   |
|                                                                             |
| Number of Odd Factors (assuming p_1 = 2):                                   |
|    T_odd(N) = (b + 1)(c + 1)...(m + 1)                                      |
|                                                                             |
| Number of Even Factors:                                                     |
|    T_even(N) = a(b + 1)(c + 1)...(m + 1) = T(N) - T_odd(N)                  |
|                                                                             |
| Sum of All Factors:                                                         |
|    S(N) = [(p_1^(a+1) - 1)/(p_1 - 1)] * [(p_2^(b+1) - 1)/(p_2 - 1)] * ...   |
|                                                                             |
| Product of All Factors:                                                     |
|    P(N) = N^(T(N) / 2)                                                      |
+-----------------------------------------------------------------------------+

Factor Structure Analysis for N=2a⋅p2b⋅p3cN = 2^a \cdot p_2^b \cdot p_3^c

  • Even Factors: An even factor must contain at least one factor of 2. Hence, the exponent of 2 can take aa values {1,2,…,a}\{1, 2, \dots, a\} instead of (a+1)(a+1) values. Therefore, Teven=a(b+1)(c+1)T_{\text{even}} = a(b+1)(c+1).
  • Odd Factors: An odd factor cannot contain any factor of 2. The exponent of 2 must be 0 (1 choice). Therefore, Todd=(b+1)(c+1)T_{\text{odd}} = (b+1)(c+1).
  • Sum of Even Factors:
Seven(N)=(21+22+⋯+2a)×(p2b+1−1p2−1)×(p3c+1−1p3−1)S_{\text{even}}(N) = (2^1 + 2^2 + \dots + 2^a) \times \left(\frac{p_2^{b+1}-1}{p_2-1}\right) \times \left(\frac{p_3^{c+1}-1}{p_3-1}\right)
  • Sum of Odd Factors:
Sodd(N)=(20)×(p2b+1−1p2−1)×(p3c+1−1p3−1)S_{\text{odd}}(N) = (2^0) \times \left(\frac{p_2^{b+1}-1}{p_2-1}\right) \times \left(\frac{p_3^{c+1}-1}{p_3-1}\right)

Remainder Theorems & Modular Arithmetic

Division Algorithm

For any integer dividend NN and positive divisor DD, there exist unique integers QQ (quotient) and RR (remainder) such that:

N=D×Q+R,where 0≤R<DN = D \times Q + R, \quad \text{where } 0 \le R < D

The Negative Remainder Method

For the displayed shortcut, choose a negative representative r satisfying -D < r < 0. If a representative lies outside this interval, reduce it modulo D first. When the dividend is just below a multiple of the divisor, modular calculations are dramatically simplified by using a negative remainder:

Rpositive=D−∣Rnegative∣R_{\text{positive}} = D - |R_{\text{negative}}|

For example, 67÷6867 \div 68 has a remainder of 6767, which is congruent to −1(mod68)-1 \pmod{68}.

Fermat's Little Theorem (FLT)

If pp is a prime number and aa is an integer co-prime to pp (gcd⁡(a,p)=1\gcd(a, p) = 1):

ap−1≡1(modp)a^{p-1} \equiv 1 \pmod p

Consequently, to compute an(modp)a^n \pmod p, reduce the exponent modulo (p−1)(p - 1):

an≡an mod (p−1)(modp)a^n \equiv a^{n \bmod (p - 1)} \pmod p

Euler's Totient Theorem

For any modulus m>1m > 1 and integer aa satisfying gcd⁡(a,m)=1\gcd(a, m) = 1:

aϕ(m)≡1(modm)a^{\phi(m)} \equiv 1 \pmod m

where ϕ(m)\phi(m) is Euler's totient function, which counts integers in {1,2,…,m}\{1, 2, \dots, m\} co-prime to mm. For prime-factorized m=p1k1p2k2⋯prkrm = p_1^{k_1} p_2^{k_2} \cdots p_r^{k_r}:

ϕ(m)=m(1−1p1)(1−1p2)⋯(1−1pr)\phi(m) = m \left(1 - \frac{1}{p_1}\right)\left(1 - \frac{1}{p_2}\right)\cdots\left(1 - \frac{1}{p_r}\right)

Wilson's Theorem

If pp is a prime number, then:

(p−1)!≡−1≡p−1(modp)(p - 1)! \equiv -1 \equiv p - 1 \pmod p

Dividing both sides by (p−1)≡−1(modp)(p - 1) \equiv -1 \pmod p gives the useful corollary:

(p−2)!≡1(modp)(p - 2)! \equiv 1 \pmod p

Polynomial & Binomial Remainder Theorems

In the integer-divisor examples below, assume x is an integer greater than 1 and n is a positive integer.

  1. (x+1)n/x(x + 1)^n / x: Leaves a remainder of 1n=11^n = 1 for all integer n≥1n \ge 1.
  2. (x−1)n/x(x - 1)^n / x: Leaves a remainder of (−1)n(-1)^n. If nn is even, remainder is 11. If nn is odd, remainder is −1≡x−1-1 \equiv x - 1.
  3. Algebraic Factorization Properties:
    • (an+bn)(a^n + b^n) is always divisible by (a+b)(a + b) whenever nn is odd.
    • (an−bn)(a^n - b^n) is always divisible by (a−b)(a - b) for all natural numbers nn.
    • (an−bn)(a^n - b^n) is always divisible by both (a−b)(a - b) and (a+b)(a + b) whenever nn is even.

Worked Examples

Worked Example 1: Rolling Stock Identification Audit (Divisibility by 88)

Problem: A computerized railway automated wagon management system scans an 8-digit rolling stock serial code as 342x18y6342x18y6. In this fictional arithmetic exercise, the code is required to be divisible by 88. If xx and yy are single decimal digits, find the maximum possible value of (3x+2y)(3x + 2y).

  • Step 1: Decompose 88 into co-prime divisors:
88=8×11,gcd⁡(8,11)=188 = 8 \times 11, \quad \gcd(8, 11) = 1
  • Step 2: Apply divisibility by 8 to the last three digits (8y68y6): The three-digit number 8y68y6 must be divisible by 8. Since 800800 is divisible by 8, the two-digit ending y6y6 must be divisible by 8. Multiples of 8 ending in 6 between 00 and 99 are: 16,56,9616, 56, 96. Therefore, y∈{1,5,9}y \in \{1, 5, 9\}.
  • Step 3: Evaluate Candidate Values for xx under each yy via Rule for 11: Number: 342x18y63 4 2 x 1 8 y 6. Sum of digits at odd places (from right): S1=6+8+x+4=18+xS_1 = 6 + 8 + x + 4 = 18 + x. Sum of digits at even places (from right): S2=y+1+2+3=6+yS_2 = y + 1 + 2 + 3 = 6 + y. Difference: D=S1−S2=(18+x)−(6+y)=12+x−yD = S_1 - S_2 = (18 + x) - (6 + y) = 12 + x - y. For divisibility by 11, 12+x−y12 + x - y must be a multiple of 11.
    • Case 1: y=9y = 9 (maximizes yy):
12+x−9=3+x12 + x - 9 = 3 + x
For $3 + x$ to be a multiple of 11, $3 + x = 11 \implies x = 8$.
Calculate: $3x + 2y = 3(8) + 2(9) = 24 + 18 = 42$.
  • Case 2: y=5y = 5:
12+x−5=7+x12 + x - 5 = 7 + x
For $7 + x = 11 \implies x = 4$.
Calculate: $3x + 2y = 3(4) + 2(5) = 12 + 10 = 22$.
  • Case 3: y=1y = 1:
12+x−1=11+x12 + x - 1 = 11 + x
For $11 + x$ to be a multiple of 11, $x = 0$ (since $x < 10$).
Calculate: $3x + 2y = 3(0) + 2(1) = 2$.
  • Conclusion: The maximum possible value of (3x+2y)(3x + 2y) is 42 (with x=8,y=9x = 8, y = 9).

Worked Example 2: Complete Canonical Factor Analysis of N=3600N = 3600

Problem: For the integer N=3600N = 3600, determine: (a) Total number of factors, (b) Number of even factors, (c) Number of odd factors, (d) Sum of all factors, and (e) Sum of even factors.

  • Step 1: Canonical Prime Factorization:
3600=36×100=(22×32)×(22×52)=24×32×523600 = 36 \times 100 = (2^2 \times 3^2) \times (2^2 \times 5^2) = 2^4 \times 3^2 \times 5^2

Here p1=2,a=4p_1 = 2, a = 4; p2=3,b=2p_2 = 3, b = 2; p3=5,c=2p_3 = 5, c = 2.

  • Step 2: Total number of factors:
T(3600)=(4+1)(2+1)(2+1)=5×3×3=45T(3600) = (4 + 1)(2 + 1)(2 + 1) = 5 \times 3 \times 3 = 45
  • Step 3: Number of odd factors: Exclude prime factor 2 entirely (set exponent of 2 to 0):
Todd=(2+1)(2+1)=3×3=9T_{\text{odd}} = (2 + 1)(2 + 1) = 3 \times 3 = 9
  • Step 4: Number of even factors:
Teven=T−Todd=45−9=36T_{\text{even}} = T - T_{\text{odd}} = 45 - 9 = 36

(Verification: a(b+1)(c+1)=4×3×3=36a(b+1)(c+1) = 4 \times 3 \times 3 = 36.)

  • Step 5: Sum of all factors:
S(3600)=(25−12−1)×(33−13−1)×(53−15−1)S(3600) = \left(\frac{2^5 - 1}{2 - 1}\right) \times \left(\frac{3^3 - 1}{3 - 1}\right) \times \left(\frac{5^3 - 1}{5 - 1}\right) S(3600)=31×262×1244=31×13×31=403×31=12,493S(3600) = 31 \times \frac{26}{2} \times \frac{124}{4} = 31 \times 13 \times 31 = 403 \times 31 = 12,493
  • Step 6: Sum of even factors: Sum of powers of 2 starting at 212^1:
(21+22+23+24)=2+4+8+16=30(2^1 + 2^2 + 2^3 + 2^4) = 2 + 4 + 8 + 16 = 30 Seven=30×13×31=30×403=12,090S_{\text{even}} = 30 \times 13 \times 31 = 30 \times 403 = 12,090

(Check: Sodd=1×13×31=403S_{\text{odd}} = 1 \times 13 \times 31 = 403, and 12,090+403=12,49312,090 + 403 = 12,493.)


Worked Example 3: Modular Remainder Evaluation

Problem: Find the remainder when 19102+28!19^{102} + 28! is divided by 29.

  • Step 1: Evaluate 19102(mod29)19^{102} \pmod{29} using Fermat's Little Theorem: The modulus 29 is a prime number, and gcd⁡(19,29)=1\gcd(19, 29) = 1. By Fermat's Little Theorem: 1929−1=1928≡1(mod29)19^{29 - 1} = 19^{28} \equiv 1 \pmod{29}. Divide the exponent 102 by 28:
102=28×3+18102 = 28 \times 3 + 18

Therefore:

19102=(1928)3×1918≡13×1918=1918(mod29)19^{102} = (19^{28})^3 \times 19^{18} \equiv 1^3 \times 19^{18} = 19^{18} \pmod{29}

Notice 19≡−10(mod29)19 \equiv -10 \pmod{29}, and 192=361=29×12+13≡13(mod29)19^2 = 361 = 29 \times 12 + 13 \equiv 13 \pmod{29}. Also 132=169=29×5+24≡−5(mod29)13^2 = 169 = 29 \times 5 + 24 \equiv -5 \pmod{29}. Then 1918=(192)9≡139=(132)4×13≡(−5)4×13=625×13(mod29)19^{18} = (19^2)^9 \equiv 13^9 = (13^2)^4 \times 13 \equiv (-5)^4 \times 13 = 625 \times 13 \pmod{29}. Since 625=29×21+16≡16(mod29)625 = 29 \times 21 + 16 \equiv 16 \pmod{29}:

16×13=208=29×7+5≡5(mod29)16 \times 13 = 208 = 29 \times 7 + 5 \equiv 5 \pmod{29}

So 19102≡5(mod29)19^{102} \equiv 5 \pmod{29}.

  • Step 2: Evaluate 28!(mod29)28! \pmod{29} using Wilson's Theorem: Since 29 is prime, Wilson's Theorem directly dictates:
(29−1)!=28!≡−1≡28(mod29)(29 - 1)! = 28! \equiv -1 \equiv 28 \pmod{29}
  • Step 3: Combine remainders:
19102+28!≡5+(−1)=4(mod29)19^{102} + 28! \equiv 5 + (-1) = 4 \pmod{29}
  • Conclusion: The remainder is 4.
Test Your Knowledge

A fictional eight-digit inventory code is 543x82y4, where x and y are decimal digits. The code is divisible by 72 and y is even. What is the maximum possible value of 2x + 3y?

A

20

B

26

C

22

D

32

Test Your Knowledge

What is the sum of all the even positive factors of the integer 2520?

A

8640

B

9072

C

8736

D

7680

Test Your Knowledge

What is the remainder when the algebraic polynomial expression (67^67 + 67) is divided by 68?

A

66

B

0

C

1

D

67

Sections you finish are checked off in the contents.