Free Online Utility • MATH Studio • Exact BigInt Engine

Generate Euler's Totient Number Sequence

Generate Euler's totient function sequence φ(1), φ(2), ..., φ(n) (OEIS A000010: 1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4...) up to 10,000 terms via a fast totient sieve with exact totient summatory Σφ(k).

Formula & Quick Reference Live Engine
φ(n) = n · Π_{p | n} (1 - 1/p) = |{ k ∈ {1..n} : gcd(k, n) = 1 }|
For prime p: φ(p) = p - 1;   Summatory: Σ_{k=1..n} φ(k) ~ (3 / π²) n²
φ(1)..φ(6)1, 1, 2, 2, 4, 2
φ(12)4
φ(30)8
EXACT INTEGER SEQUENCE · OEIS A000010
Generate Euler's Totient Number Sequence

        
100% client-side exact mathematics Instant

Session Calculation Log

No entries recorded in this session yet.

Complete Technical Guide to Generate Euler's Totient Number Sequence

Euler's totient sequence φ(n) = 1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, ... (OEIS A000010) counts how many positive integers up to n are relatively prime to n. It forms the backbone of RSA public-key cryptography and Euler's theorem a^φ(n) ≡ 1 (mod n).

Generate up to 10,000 exact totient values instantaneously along with the exact summatory totient Φ(n) = Σφ(k), which equals the number of reduced fractions in the Farey sequence F_n (minus 1).

Euler's Product Formula & Multiplicative Sieve

φ(n) = n · Π_{p | n} (1 - 1/p) = |{ k ∈ {1..n} : gcd(k, n) = 1 }|
For prime p: φ(p) = p - 1;   Summatory: Σ_{k=1..n} φ(k) ~ (3 / π²) n²

A linear-like totient sieve starts with φ[k] = k and multiplies every multiple of each prime p by (p−1)/p in O(n log log n) time, simultaneously tracking the exact Farey-sequence summatory Σφ(k).

How to Use Generate Euler's Totient Number Sequence

  1. 1Pick a quick preset or enter any term count up to 10,000.
  2. 2Choose comma, space, or newline separation and optionally toggle 1-based term indexing.
  3. 3Copy plain text, export structured JSON, or download a .txt file with one click.

Reference Examples & Worked Benchmarks

Index / MilestoneExact TermNotes
φ(1)..φ(6)1, 1, 2, 2, 4, 2φ(p) = p−1 for primes
φ(12)4{1, 5, 7, 11} coprime to 12
φ(30)830·(1/2)·(2/3)·(4/5) = 8

Practical Applications & Engineering Workflows

Combinatorics & Number Theory

Generate verified terms of OEIS A000010 instantaneously for proofs, OEIS lookups, and test fixtures.

Algorithm & Curriculum Verification

Cross-check exact BigInt outputs without floating-point overflow past 2^53.

Accuracy, Edge Cases & Best Practices

  • All calculations run locally in your browser using exact BigInt / sieve arithmetic matching OEIS A000010.

All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.

Frequently Asked Questions

Why is φ(n) always even for n ≥ 3?
Because whenever gcd(k, n) = 1, we also have gcd(n − k, n) = 1, and k ≠ n − k for n ≥ 3—so coprime integers pair up evenly.
How is Euler's totient used in RSA encryption?
For an RSA modulus N = p·q, φ(N) = (p−1)(q−1) defines the modular exponent group order used to derive the private key d ≡ e⁻¹ (mod φ(N)).