Introduction
Numbers को even, odd, prime या composite classify करना number theory और aptitude problems का basic foundation है। ये categories pattern पहचानने, divisibility shortcuts और आगे के topics जैसे factorization और modular arithmetic में मदद करती हैं।
Pattern: Even, Odd, Prime, Composite
Pattern
Integers को जल्दी classify करने के लिए simple divisibility और divisor-count rules का उपयोग करें।
- Even: Integer n even है अगर
n ≡ 0 (mod 2). Practically: last digit ∈ {0,2,4,6,8}. - Odd: Integer n odd है अगर
n ≡ 1 (mod 2). Last digit ∈ {1,3,5,7,9}। - Prime: Integer p > 1 prime है अगर उसके सिर्फ दो positive divisors हों - 1 और p. Practical check: primes ≤ √p तक divisibility test करें।
- Composite: Integer n > 1 जिसका कोई divisor d हो जहाँ 1 < d < n → यानी दो से ज़्यादा divisors हों।
- Special note: 1 न prime है न composite।
- Quick primality shortcuts:
- अगर n even है और n > 2 → composite।
- Digits का sum 3 से divisible हो (और n > 3) → composite।
- Last digit 0 या 5 हो (और n > 5) → composite।
- Primes > 3 सिर्फ form
6k ± 1में आते हैं (useful filter), पर फिर भी √n तक divisibility test ज़रूरी है। - Sieve of Eratosthenes: N तक primes list करने का efficient तरीका (multiples को cross out करके)।
- Formal practical test: n के लिए 2, 3 और फिर primes 5, 7, 11... √n तक test करें। कोई भी divide न करे तो prime, otherwise composite।
Step-by-Step Example
Question
Numbers 1, 2, 29 और 49 को even/odd और prime/composite में classify करें।
Solution
-
Step 1: Number: 1
Check: 1 के सिर्फ एक positive divisor है (1). Definition के अनुसार 1 न prime है न composite। यह odd है (last digit 1), पर prime/composite में “neither” category में आता है।
-
Step 2: Number: 2
Even/odd: last digit 2 → even.
Prime test: divisors सिर्फ 1 और 2 → prime (सबसे छोटा और एकमात्र even prime)।
-
Step 3: Number: 29
Even/odd: last digit 9 → odd.
Prime test: √29 ≈ 5.38 → primes ≤ 5 test करें → {2,3,5}.
- 29 mod 2 = 1
- 29 mod 3 = 2
- 29 mod 5 = 4
कोई divisor नहीं मिला → 29 prime है।
-
Step 4: Number: 49
Even/odd: last digit 9 → odd.
Prime test: √49 = 7 → primes ≤ 7 → {2,3,5,7}.
- 49 mod 2 = 1
- 49 mod 3 = 1
- 49 mod 5 = 4
- 49 mod 7 = 0 → divisible
Divisor 7 मिला (1 < 7 < 49) → 49 composite है (49 = 7 × 7).
-
Final Answer
1 → neither prime nor composite (odd);
2 → even & prime;
29 → odd & prime;
49 → odd & composite. -
Quick Check
29 किसी small prime से divisible नहीं। 49 ÷ 7 = 7 composite confirm करता है। 2 prime confirm। 1 special case है। ✅
Quick Variations
1. Prime pairs (twin primes) जैसे (11,13), (17,19) पहचानें।
2. बड़े odd number के लिए √n तक trial division या large n के लिए probabilistic tests।
3. Small composites को primes ≤ √n से check करके factor करें।
Trick to Always Use
- Step 1 → Even/odd के लिए last digit तुरंत check करें।
- Step 2 → Composite को जल्दी eliminate करने के लिए 2, 3, 5 के simple rules use करें।
- Step 3 → Primality test में सिर्फ √n तक divisors check करें (सिर्फ prime divisors)।
- Step 4 → 6k ± 1 filter use करें ताकि obvious non-candidates skip हों।
Summary
Summary
- Even/odd classification last digit से तय होती है।
- Prime/composite classification divisors पर आधारित है - prime के दो divisors, composite के दो से ज़्यादा।
- 1 special case है - न prime, न composite।
- 2 एकमात्र even prime है; बाकी सभी even numbers composite होते हैं।
याद रखने लायक example:
Even/odd के लिए last digit देखें। Prime test के लिए 2, 3, 5 और फिर √n तक primes से divisibility test करें। कोई divide न करे तो number prime है।
