素数とは1とそれ自身以外に約数を持たない1より大きい自然数です。最初の素数は:2, 3, 5, 7, 11, 13, 17, 19, 23, 29... 2は唯一の偶数の素数です。nが素数かどうかを確認するには、√nまでの素数でnが割り切れないことを確認するだけで十分です。エラトステネスの篩は指定した数までの全素数を見つける効率的な方法です。素数は暗号技術や情報セキュリティに重要な応用があります。
数学7 min readApril 2, 2026
How to Find Prime Numbers: Sieve of Eratosthenes and Other Methods
Learn multiple methods to identify prime numbers — from trial division to the ancient Sieve of Eratosthenes — with worked examples and a complete prime list up to 100.
Topics:prime numbersnumber theorysieve of eratosthenesfactors
無料の計算機を試す
登録不要