本文へスキップ
Number Buffet

オイラーのトーシェント関数の値

φ(n) は n より小さく n と互いに素な数の個数を数えます。オイラーの定理と RSA の核心にある関数です。

OEIS A000010 · 読了 3 分

設定

クイックプリセット

φ(1) = 1 by convention: the empty product counts 1 itself as coprime to 1.

Up to 1,000,000. At most 10,000 rows are shown.

Group large values as 400,000 for readability.

見た目を微調整

まず画像の横にあるプリセットを選んでください。ここで細かく調整します。

Frame

A border drawn inside the edge of the image.

詳細設定

結果

50 件の値

1: 1, 2: 1, 3: 2, 4: 2, 5: 4, 6: 2, 7: 6, 8: 4, 9: 6, 10: 4, 11: 10, 12: 4, 13: 12, 14: 6, 15: 8, 16: 8, 17: 16, 18: 6, 19: 18, 20: 8, 21: 12, 22: 10, 23: 22, 24: 8, 25: 20, 26: 12, 27: 18, 28: 12, 29: 28, 30: 8, 31: 30, 32: 16, 33: 20, 34: 16, 35: 24, 36: 12, 37: 36, 38: 18, 39: 24, 40: 16, 41: 40, 42: 12, 43: 42, 44: 20, 45: 24, 46: 22, 47: 46, 48: 16, 49: 42, 50: 20


画像を作成

これらの数字を装飾して画像としてダウンロードするには JavaScript を有効にしてください。値そのものは上に一覧表示されています。

Text on the image

Drag a line straight onto the picture to place it — once placed, it stays exactly where you put it. Everything here is drawn into the download.

以下の解説記事はまだ翻訳されておらず、英語で表示されます。

オイラーのトーシェント関数の値について

The function is Leonhard Euler's. In 1736, early in his first St Petersburg period, he published the first proof of what we now call Fermat's little theorem — that a^(p−1) ≡ 1 modulo a prime p. Fermat had asserted it in a letter in 1640 without proof, and Euler returned to it repeatedly over the following decades, looking for the version that worked for composite moduli. The generalisation he found, printed in 1763 in the St Petersburg Academy's Novi Commentarii, required knowing how many numbers below n are coprime to n. That count is the function, and the result is Euler's theorem: a^φ(n) ≡ 1 modulo n whenever a and n share no factor.

Euler had no settled notation for it. The symbol φ is Carl Friedrich Gauss's, introduced in the Disquisitiones Arithmeticae of 1801, where it anchors the treatment of primitive roots and residue classes. The English name arrived much later still: James Joseph Sylvester coined "totient" in 1879, along with "totitives" for the coprime numbers being counted. Both words were his inventions, and only the first stuck.

The function moved from pure arithmetic to infrastructure in 1977, when Ron Rivest, Adi Shamir and Leonard Adleman built their public-key cryptosystem on it. For a modulus n = pq, φ(n) = (p−1)(q−1), and the private exponent is the inverse of the public one modulo φ(n) — so knowing φ(n) is equivalent to being able to decrypt. Their paper appeared in Communications of the ACM in 1978. Modern implementations usually substitute the closely related Carmichael function λ(n) = lcm(p−1, q−1), which divides φ(n) and yields smaller exponents.

Basic questions remain open. Carmichael conjectured around 1907 that no value of φ is attained by exactly one integer; a century later that is still unproven.

主な性質

  • φ(n) counts the integers from 1 to n that are coprime to n, so φ(1) = 1 and the sequence starts 1, 1, 2, 2, 4, 2, 6, 4, 6, 4.
  • φ(n) = n − 1 exactly when n is prime — the condition is necessary as well as sufficient.
  • φ is multiplicative: φ(mn) = φ(m)·φ(n) whenever gcd(m, n) = 1, and φ(p^k) = p^k − p^(k−1) for prime p.
  • Euler’s product formula: φ(n) = n · ∏(1 − 1/p) over the distinct primes p dividing n.
  • Gauss’s identity: summing φ(d) over all divisors d of n gives exactly n.
  • φ(n) is even for every n ≥ 3; the only odd value it ever takes is 1, at n = 1 and n = 2.
  • φ(n) > √n for every n > 6, and φ(n) ≤ n − √n for every composite n.
  • Not every even number is a totient value: 14 is the smallest even number that is φ(n) for no n at all.

登場する場面

  • RSA key generation: for a modulus n = pq the decryption exponent is the modular inverse of the encryption exponent with respect to φ(n) = (p−1)(q−1). Current standards generally use the Carmichael function λ(n) instead, which divides φ(n).
  • Euler’s theorem lets huge exponents be reduced modulo φ(n) before any modular exponentiation is performed — the standard shortcut in computer-algebra systems and crypto libraries.
  • There are exactly φ(n) primitive nth roots of unity, so the nth cyclotomic polynomial has degree φ(n) and a cyclic group of order n has φ(n) generators.
  • The Farey sequence of order n — all reduced fractions in [0, 1] with denominator at most n — has exactly 1 + φ(1) + φ(2) + … + φ(n) terms.
  • Totient sums give the coprimality density: the totients up to x add up to about 3x²/π², which is the same statement as "two random integers are coprime with probability 6/π² ≈ 0.6079".
  • For n coprime to 10, the repeating block in the decimal expansion of 1/n has length equal to the multiplicative order of 10 modulo n, which always divides φ(n).

このジェネレーターの使い方

生成された値は上部に表示され、横にコピーボタンがあります。画像にするには 画像を作成 のスタイルから見た目を選び、書き出しサイズを指定して PNG・JPEG・WebP でダウンロードしてください。すべてブラウザー内で描画されるため、生成した内容がサーバーに送られることはありません。

操作に合わせてアドレスバーが更新されるので、リンクは常に表示どおりの状態を再現します。特定の数列を共有したり、設定を保存しておくのに便利です。値をプレーンテキストで取り出すには コピー、CSV・JSON・NDJSON・SQL・XML が必要なら データを書き出す を使ってください。

出典

このページの歴史的な記述は、上に挙げたオープンライセンスの資料に基づいています。誤りを見つけたら お知らせください。修正します。