Number Theory Calculator
Explore any integer: primality test, divisor count and sum, Euler totient, and prime factorization with steps.
Calculator
Number Theory Inputs
Integer from 2 to 10,000,000
Number Theory Summary for 60
All divisors (12)
1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
Results
Primality
Composite
2^2 × 3 × 5
12
Positive divisors of n
168
Sum of all divisors
16
Residues coprime to n
2
First divisor found
3
Unique primes in n
Trial division and divisor enumeration are exact for integers 2–10,000,000; τ, σ, and φ all derive from one verified factorization.
Visualizations
Profile of n
Totient share
Coprime density
Divisor sum vs n
Formula
Factorize once, then read everything off the exponents: choices multiply for the count, geometric series multiply for the sum, and distinct primes shrink n for the totient.
Alternative Form
Variables
| Symbol | Name | Unit | Description |
|---|---|---|---|
| n | Input integer | integer | 2 to 10,000,000 |
| τ(n) | Divisor count | count | Number of positive divisors |
| σ(n) | Divisor sum | integer | Sum of all positive divisors |
| φ(n) | Euler totient | count | Residues 1..n coprime to n |
Explanation
The exponent pattern of n is its fingerprint: τ counts exponent choices, σ weights them geometrically, φ deletes the residue classes sharing a prime.
Derivation
Write n = Π p^e. Divisors pick exponents 0..e independently (τ). Summing p^0+…+p^e per prime and multiplying gives σ. Keeping the (p−1)/p fraction of residues coprime to each p gives φ.
Step-by-Step Calculation
Follow each step to understand how the result is calculated from your inputs.
Validate the input and set the trial-division bound.
Run trial division (2, 3, then 6k±1) to decide primality.
Factorize completely by dividing out each prime.
Count divisors from the exponents.
Sum divisors with the geometric-series product.
Apply the totient product over distinct primes.
Worked Examples
See how the calculator works with different scenarios.
Scenario
Highly composite default.
Inputs
Calculation
60 = 2² × 3 × 5 τ = 3×2×2 = 12, σ = 168, φ = 16
Result
Composite · τ=12 · σ=168 · φ=16
Interpretation
Twelve divisors sum to 168; sixteen residues below 60 are coprime to it.
Understanding Your Result
Your Result: Primality, τ(n), σ(n), and φ(n) for your input — see the result cards.
Typical range: τ(n) grows slowly (usually under 100 below the cap); φ(n)/n ranges from near 0 to (n−1)/n for primes.
What This Means
The verdict says whether n splits; τ and σ describe its divisor landscape; φ counts the residues that share nothing with n.
Why It Matters
These five signatures feed fractions (GCD), scheduling (LCM), ciphers (φ), and every divisibility question downstream.
Professional Interpretation
τ = 2 flags a prime; σ = 2n flags a perfect number; φ = n−1 independently confirms primality.
Recommendations
- •Multiply the factorization to verify n
- •Read τ = 2 as prime
- •Compare σ against 2n for abundance
- •Use φ for fraction and cipher work
- •Try neighbors to spot prime gaps
Educational Content
Introduction
Number theory studies the integers themselves: who divides whom, how divisors accumulate, and which residues stay coprime.
Concept Explanation
One factorization unlocks four functions — trial division for the verdict, exponent arithmetic for τ and σ, and the prime-deletion product for φ.
Applications
Benefits
- •Five signatures from one input
- •Exact trial-division verdict
- •Exponent-level transparency
- •Divisor strip visualization
- •Totient density gauge
Limitations
- •Caps at 10,000,000
- •Trial division slows near the cap
- •Single integer per run
Best Practices
- •Verify the factorization product
- •Quote τ with the divisor list
- •Use φ/n as the coprime density
- •Check σ = 2n for perfect numbers
- •Compare neighbors for patterns
Common Misconceptions
Practical Tips
- •Multiply out the factorization to verify n
- •Read τ = 2 as an instant prime flag
- •Compare σ with 2n for perfect/abundant/deficient
- •Use φ = n−1 as a primality cross-check
- •Scan the divisor strip for symmetry pairs
- •Try n±1 to explore prime gaps
- •Keep inputs below 10,000,000
Common Mistakes
Assumptions
This calculator makes the following assumptions to provide estimates:
Limitations
Be aware of these limitations when using this calculator:
Frequently Asked Questions
Answers to common questions about this calculator.
What does this number theory hub compute?
What are τ(n) and σ(n)?
What is φ(n)?
How is primality tested here?
Why is n capped at 10,000,000?
What does the factorization string mean?
How do exponents give the divisor count?
Can a prime be detected from φ(n)?
Is 1 a valid input?
Where do I go deeper from here?
Related Calculators
Explore more calculators related to this topic.
Related Guides
Deepen your understanding with these educational resources.
Glossary
Technical terms used in mortgage calculations explained in plain language.
- Prime number
- Integer above 1 with exactly two divisors.
- Composite number
- Integer above 1 that is not prime.
- Divisor count τ(n)
- How many positive integers divide n.
- Divisor sum σ(n)
- Total of all positive divisors of n.
- Euler totient φ(n)
- Count of residues 1..n coprime to n.
- Prime factorization
- Unique product of prime powers equal to n.
- Coprime
- Two numbers sharing no prime factor (GCD 1).
- Trial division
- Testing divisors ascending from 2 up to √n.
Authoritative References
Trusted sources and standards referenced by this calculator.
Applicable Standards
Was This Calculator Helpful?
Page Information
2026-09-29
2.0.0
Free to use for educational and professional purposes.