Number Theory and Combinatorics for CSIR NET Mathematics: Congruences, CRT, Euler’s Function and Inclusion–Exclusion
Last updated: 2 December 2026 (IST). Verified against the official CSIR HRDG Mathematical Sciences syllabus (Unit 2) and the IIT JAM 2027 (IIT Kharagpur) and GATE 2027 (IIT Madras) Mathematics syllabi.

Number theory and combinatorics in one paragraph
The CSIR NET Unit 2 Algebra list opens with counting and number theory before it reaches groups, rings and fields: permutations, combinations, the pigeon-hole and inclusion-exclusion principles, derangements, the fundamental theorem of arithmetic, divisibility, congruences, the Chinese Remainder Theorem, Euler’s \(\varphi\)-function and primitive roots. These are among the most computational questions in Part B and a regular source of quick Part C marks, because every one of them reduces to a handful of formulas. IIT JAM 2027 asks only for the counting basics (Section 3, basic algebra), and the GATE 2027 MA syllabus does not name this topic. CSIR NET December 2026 Mathematical Sciences is on 27 December 2026, Shift 2 (3:00 PM to 6:00 PM), as per the NTA notice of 20 November 2026. Use the CSIR NET December 2026 timeline tracker for later notices.
What each exam’s syllabus says
| Exam | Number theory and combinatorics in the official syllabus |
|---|---|
| CSIR NET Mathematical Sciences (Unit 2, Algebra) | Permutations, combinations, pigeon-hole principle, inclusion-exclusion principle, derangements. Fundamental theorem of arithmetic, divisibility in Z, congruences, Chinese Remainder Theorem, Euler’s phi function, primitive roots. |
| IIT JAM 2027 Mathematics (Section 3) | Basic algebra: permutations and combinations, binomial theorem. Number theory is not listed. |
| GATE 2027 Mathematics (Section 6, Algebra) | Groups, rings, fields. Counting and elementary number theory are not named. |
Groups, rings and fields are in the abstract algebra guide. For the IIT JAM counting topics in depth, read the basic algebra guide for IIT JAM. The full CSIR NET topic list is in the CSIR NET Mathematics syllabus guide.
The core results
Divisibility and gcd. The Euclidean algorithm computes \(\gcd(a,b)\), and Bézout’s identity gives integers \(x,y\) with \(ax+by=\gcd(a,b)\). The fundamental theorem of arithmetic says every integer \(n\gt1\) is a product of primes, uniquely up to order. If \(n=p_1^{a_1}\cdots p_r^{a_r}\), the number of divisors is \(\tau(n)=\prod(a_i+1)\) and their sum is \(\sigma(n)=\prod\frac{p_i^{a_i+1}-1}{p_i-1}\).
Linear congruences. \(ax\equiv b\pmod n\) is solvable exactly when \(d=\gcd(a,n)\) divides \(b\), and then it has exactly \(d\) solutions modulo \(n\). If \(\gcd(a,n)=1\), \(a\) has an inverse modulo \(n\) and the solution is unique.
Fermat, Euler, Wilson. If \(p\) is prime and does not divide \(a\), \(a^{p-1}\equiv1\pmod p\). More generally \(a^{\varphi(n)}\equiv1\pmod n\) when \(\gcd(a,n)=1\). Wilson’s theorem: \((p-1)!\equiv-1\pmod p\), and the converse holds, so it characterises primes.
Chinese Remainder Theorem. If \(m_1,\dots,m_k\) are pairwise coprime, the system \(x\equiv a_i\pmod{m_i}\) has a unique solution modulo \(m_1\cdots m_k\). Equivalently, \(\mathbb{Z}_{mn}\cong\mathbb{Z}_m\times\mathbb{Z}_n\) as rings when \(\gcd(m,n)=1\).
Euler’s function. \(\varphi(n)\) counts integers in \(\{1,\dots,n\}\) coprime to \(n\). It is multiplicative, \(\varphi(p^k)=p^k-p^{k-1}\), \(\varphi(n)=n\prod_{p\mid n}\left(1-\frac1p\right)\), and \(\sum_{d\mid n}\varphi(d)=n\). The group of units \(U(n)\) has order \(\varphi(n)\).
Primitive roots. A primitive root modulo \(n\) is a generator of \(U(n)\). One exists exactly when \(n=1,2,4,p^k\) or \(2p^k\) with \(p\) an odd prime, and then there are \(\varphi(\varphi(n))\) of them. To test whether \(g\) has order \(\varphi(n)\), check that \(g^{\varphi(n)/q}\not\equiv1\) for every prime \(q\mid\varphi(n)\).
Counting. Permutations: \(P(n,r)=\frac{n!}{(n-r)!}\); combinations: \(C(n,r)=\frac{n!}{r!(n-r)!}\). Pigeon-hole: if \(m\) objects go into \(n\) boxes, some box holds at least \(\lceil m/n\rceil\) of them. Inclusion-exclusion: \(\left|\bigcup_{i=1}^nA_i\right|=\sum|A_i|-\sum|A_i\cap A_j|+\sum|A_i\cap A_j\cap A_k|-\cdots+(-1)^{n+1}|A_1\cap\cdots\cap A_n|\). Derangements: \(D_n=n!\sum_{k=0}^n\frac{(-1)^k}{k!}\), with \(D_n=(n-1)(D_{n-1}+D_{n-2})\); \(D_1=0\), \(D_2=1\), \(D_3=2\), \(D_4=9\), \(D_5=44\), \(D_6=265\).
Inclusion–exclusion in one picture

Solved examples in exam style
Example 1: a congruence with several solutions (CSIR NET)
Solve \(14x\equiv30\pmod{100}\).
Solution. \(\gcd(14,100)=2\) divides \(30\), so there are exactly \(2\) solutions modulo \(100\). Divide by \(2\): \(7x\equiv15\pmod{50}\). Since \(7\cdot43=301\equiv1\pmod{50}\), \(x\equiv15\cdot43=645\equiv45\pmod{50}\). The solutions modulo \(100\) are \(x=45\) and \(x=95\). Check: \(14\cdot45=630\equiv30\) and \(14\cdot95=1330\equiv30\pmod{100}\).
Example 2: the Chinese Remainder Theorem (CSIR NET)
Find all \(x\) with \(x\equiv2\pmod3\), \(x\equiv3\pmod5\) and \(x\equiv2\pmod7\).
Solution. The moduli are pairwise coprime, so the solution is unique modulo \(105\). From the first and third congruences, \(x\equiv2\pmod{21}\), so \(x=2+21t\). Then \(2+21t\equiv3\pmod5\) gives \(t\equiv1\pmod5\) (since \(21\equiv1\)). So \(x=23\), and the answer is \(x\equiv23\pmod{105}\).
Example 3: the last two digits of a large power (CSIR NET)
Find the last two digits of \(7^{2026}\).
Solution. We need \(7^{2026}\bmod100\). Here \(\varphi(100)=40\), but the order of \(7\) is smaller: \(7^2=49\) and \(7^4=2401\equiv1\pmod{100}\). Since \(2026=4\cdot506+2\), \(7^{2026}\equiv7^2=49\pmod{100}\). The last two digits are \(49\).
Example 4: counting primitive roots (CSIR NET)
How many primitive roots does \(25\) have? Show that \(2\) is one.
Solution. \(25=5^2\), so \(U(25)\) is cyclic of order \(\varphi(25)=20\), and it has \(\varphi(20)=8\) generators. To test \(2\): the prime divisors of \(20\) are \(2\) and \(5\), so we check \(2^{20/2}=2^{10}=1024\equiv24\not\equiv1\) and \(2^{20/5}=2^4=16\not\equiv1\pmod{25}\). Hence the order of \(2\) is \(20\) and \(2\) is a primitive root.
Example 5: inclusion–exclusion with three conditions (CSIR NET)
How many integers from \(1\) to \(1000\) are divisible by none of \(2\), \(3\) and \(5\)?
Solution. Let \(A,B,C\) be the multiples of \(2,3,5\). Then \(|A|=500\), \(|B|=333\), \(|C|=200\); \(|A\cap B|=\lfloor1000/6\rfloor=166\), \(|A\cap C|=100\), \(|B\cap C|=66\); \(|A\cap B\cap C|=\lfloor1000/30\rfloor=33\). So \(|A\cup B\cup C|=1033-332+33=734\) and the required count is \(1000-734=266\).
Example 6: derangements and fixed points (CSIR NET)
(i) What is the probability that a random permutation of \(5\) objects has no fixed point? (ii) How many permutations of \(\{1,\dots,6\}\) have exactly \(2\) fixed points?
Solution. (i) \(D_5=44\) out of \(5!=120\), so the probability is \(\frac{44}{120}=\frac{11}{30}\). (ii) Choose the two fixed points in \(C(6,2)=15\) ways and derange the other four: \(D_4=9\). The count is \(15\cdot9=135\).
Example 7: the pigeon-hole principle (CSIR NET)
Show that among any \(51\) integers chosen from \(\{1,2,\dots,100\}\), one divides another.
Solution. Write each chosen number as \(2^am\) with \(m\) odd. There are only \(50\) odd numbers in \(\{1,\dots,100\}\), so two of the \(51\) numbers share the same odd part \(m\): say \(2^am\) and \(2^bm\) with \(a\lt b\). Then \(2^am\) divides \(2^bm\).
Example 8: Wilson’s theorem (CSIR NET)
Find the remainder when \(15!\) is divided by \(17\).
Solution. By Wilson, \(16!\equiv-1\pmod{17}\). Since \(16\equiv-1\), \(16!=16\cdot15!\equiv-15!\). So \(-15!\equiv-1\) and \(15!\equiv1\pmod{17}\).
Example 9: counting divisors (CSIR NET)
Find the number of positive divisors of \(360\) and their sum.
Solution. \(360=2^3\cdot3^2\cdot5\). So \(\tau(360)=(3+1)(2+1)(1+1)=24\) and \(\sigma(360)=\frac{2^4-1}{1}\cdot\frac{3^3-1}{2}\cdot\frac{5^2-1}{4}=15\cdot13\cdot6=1170\).
Common mistakes
- Applying the Chinese Remainder Theorem when the moduli are not coprime. Check consistency first.
- Reducing the exponent modulo \(\varphi(n)\) when \(\gcd(a,n)\neq1\). Euler’s theorem needs \(\gcd(a,n)=1\).
- Assuming that \(U(n)\) is always cyclic. It is cyclic only for the \(n\) in the primitive-root list; \(U(8)\) is not cyclic.
- Stopping inclusion–exclusion after two terms, or getting the signs wrong in the three-set formula.
- Using \(n!/e\) without rounding for derangements.
- Forgetting that \(ax\equiv b\) with \(\gcd(a,n)=d\gt1\) has \(d\) solutions modulo \(n\), not one.
A two-week plan for number theory and counting
| Week | What to do |
|---|---|
| 1 | gcd, Bézout, linear congruences, Fermat, Euler, Wilson, CRT. Do ten last-two-digits and remainder problems. |
| 2 | \(\varphi\) and primitive roots, \(\tau\) and \(\sigma\), pigeon-hole, inclusion–exclusion and derangements. Finish with CSIR NET previous year questions on Unit 2 Algebra. |
Learn with GP Sir’s videos
Learn number theory with MathsCare
Want live classes and exam-style practice with GP Sir? Message or call the MathsCare team, or see the CSIR NET Maths course. IIT JAM aspirants can start with the IIT JAM Maths course. Next, the abstract algebra guide continues with groups, rings and fields.
GP Sir’s Combat Test Series for CSIR NET/JRF Mathematics and the Short Notes Booklet are the practice and revision books we point students to. Check the book pages for the current edition before you buy.
Frequently asked questions
Where are number theory and combinatorics in the CSIR NET Mathematics syllabus?
In Unit 2, under Algebra: permutations, combinations, pigeon-hole principle, inclusion-exclusion principle, derangements; fundamental theorem of arithmetic, divisibility in Z, congruences, Chinese Remainder Theorem, Euler’s phi function and primitive roots. Mathematics candidates answer Unit 2 and Unit 3 in addition to Unit 1.
Is number theory in the IIT JAM 2027 or GATE 2027 Mathematics syllabus?
Not as a topic. The JAM 2027 MA syllabus lists only basic algebra (permutations and combinations, binomial theorem) in Section 3. The GATE 2027 MA Algebra section (Section 6) lists groups, rings and fields. Number theory and the pigeon-hole and inclusion-exclusion principles are named in the CSIR NET syllabus.
When does ax ≡ b (mod n) have a solution?
Exactly when gcd(a, n) divides b. If d = gcd(a, n) divides b, there are exactly d solutions modulo n, and they are found by dividing through by d and inverting a/d modulo n/d.
For which n does a primitive root exist?
Exactly when n = 1, 2, 4, p^k or 2p^k with p an odd prime. Equivalently, exactly when the group of units U(n) is cyclic. When one exists, there are phi(phi(n)) primitive roots.
What is the formula for derangements?
D_n = n!(1 − 1/1! + 1/2! − … + (−1)^n/n!), which is the nearest integer to n!/e for n ≥ 1. For example D_4 = 9 and D_5 = 44. It also satisfies D_n = (n − 1)(D_{n−1} + D_{n−2}).
Can I contact MathsCare about CSIR NET classes?
Yes. Message or call the MathsCare team on WhatsApp at 95710 85397 for details of the CSIR NET Mathematics course.
Official sources
- CSIR HRDG Mathematical Sciences syllabus (Units 1–3): official syllabus PDF; notices: csirnet.nta.nic.in
- NTA public notice dated 20 November 2026, subject-wise schedule of Joint CSIR-UGC NET December 2026: Mathematical Sciences (code 704) on 27 December 2026, Shift 2, 3:00 PM to 6:00 PM. Download the notice.
- IIT JAM 2027 Mathematics (MA) syllabus, Organising Institute IIT Kharagpur: MA syllabus PDF; website: jam.iitkgp.ac.in. The examination is on 14 February 2027.
- GATE 2027 Mathematics (MA) syllabus, Organising Institute IIT Madras: official MA syllabus PDF; website: gate2027.iitm.ac.in. The GATE 2027 syllabi have been revised; always check this PDF.
Official dates and all resources in one place: CSIR NET Mathematics exam guide: dates, syllabus and free resources · IIT JAM Mathematics 2027 exam guide: dates, syllabus and free resources.