Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in --d --h --m --s-- days -- hours -- minutes -- seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 13d 22h 28m 34s13 days 22 hours 28 minutes 34 seconds.
Topic
Number theory problems use divisibility, modular arithmetic and digit properties, and often reward spotting an invariant.
49 free, 33 with Premium.
Number theory studies the integers: divisibility, primes and remainders. Interview problems ask for a last digit, a remainder, whether an equation has integer solutions, or why some process can never reach a target, and most yield to modular arithmetic.
Reduce early and often: (a·b) mod n = ((a mod n)(b mod n)) mod n. Last-digit questions are arithmetic mod 10.
Euclid's algorithm finds gcd(a, b), and the extended version finds x, y with ax + by = gcd(a, b). That decides which linear equations have integer solutions.
If gcd(a, n) = 1 then a^φ(n) ≡ 1 (mod n), so huge exponents reduce modulo φ(n).
A number is congruent to its digit sum mod 9. Parity and mod-3 arguments are the usual invariants in impossibility proofs.
Problems marked with a lock are part of Premium.