Q1.
The decimal expansion of p/q will be terminating precisely when the prime factors of q are only 2, only 5 or both 2 and 5. Can you explain why?
Answer
The word “precisely” means two statements must be proved, one in each direction. Throughout, p/q is in lowest terms.
If q = 2^m × 5^n, the decimal terminates. Let k be the larger of m and n. Multiply top and bottom by whatever is missing:
2^m 5^n × 2^(k−m) 5^(k−n) = 2^k 5^k = 10^k
so p/q = (p × 2^(k−m) 5^(k−n))/10^k
so p/q = (p × 2^(k−m) 5^(k−n))/10^k
A whole number divided by 10^k is a decimal that stops after k places. The chapter's own example is 3/20 with 20 = 2² × 5, k = 2:
3/20 = (3 × 5)/(2² × 5 × 5) = 15/100 = 0.15
If the decimal terminates, q can only be 2s and 5s. A decimal stopping after k places is
p/q = N/10^k for some integer N
so p × 10^k = N × q
q divides p × 10^k
but gcd(p, q) = 1, so q divides 10^k = 2^k 5^k
so p × 10^k = N × q
q divides p × 10^k
but gcd(p, q) = 1, so q divides 10^k = 2^k 5^k
A divisor of 2^k 5^k can contain no prime other than 2 and 5. Hence q has exactly the stated form.
Why it happens: our numerals are written in base 10, and 10 = 2 × 5. A denominator can be absorbed into a power of ten only if it is built from ten's own prime bricks. Any other prime — 3, 7, 11, 13 — survives every multiplication, the division never reaches remainder 0, and since only finitely many remainders are possible one of them must return, sending the digits into a loop.
Did you know? In base 3, the fraction 1/3 would terminate (it is 0.1 in that base) while 1/2 would repeat. Terminating is a property of the number and the base, not of the number alone.