Prime Number Calculator

Input a number to check if it's a prime number, or define a range to generate all prime numbers within that range.

Prime Number Check or Generate

What Is a Prime Number?

A prime number is a natural number greater than 1 that has no divisors other than 1 and itself. In simpler terms, a prime number can only be divided evenly by 1 and itself. Examples of prime numbers include 2, 3, 5, 7, 11, and so on. Prime numbers are unique because they lack any other factors apart from 1 and themselves.

How to Determine If a Number Is a Prime

Follow these steps to check if a number is a prime:

  1. Eliminate Special Cases: Numbers less than 2 are not prime.
  2. Test for Divisors: Start dividing the number by natural numbers from 2 up to the square root of the number. Check if any division results in a whole number.
  3. Result Evaluation: If no divisor is found during the above step, the number is a prime. If at least one divisor is found, the number is not a prime.

Examples

Example 1: Is 45 a Prime Number?

Solution:

Check divisors from 2 to \( \sqrt{45} \approx 6.7 \).

Divide 45 by 5.

Result: 45 is not a prime number.

Example 2: Is 57 a Prime Number?

Solution:

Check divisors from 2 to \( \sqrt{57} \approx 7.55 \).

Divide 57 by 3.

Result: 57 is not a prime number.

Example 3: Is 71 a Prime Number?

Solution:

Check divisors from 2 to \( \sqrt{71} \approx 8.426 \).

No divisor results in a whole number.

Result: 71 is a prime number.

Prime Numbers Below 1000

  • 2
  • 3
  • 5
  • 7
  • 11
  • 13
  • 17
  • 19
  • 23
  • 29
  • 31
  • 37
  • 41
  • 43
  • 47
  • 53
  • 59
  • 61
  • 67
  • 71
  • 73
  • 79
  • 83
  • 89
  • 97
  • 101
  • 103
  • 107
  • 109
  • 113
  • 127
  • 131
  • 137
  • 139
  • 149
  • 151
  • 157
  • 163
  • 167
  • 173
  • 179
  • 181
  • 191
  • 193
  • 197
  • 199
  • 211
  • 223
  • 227
  • 229
  • 233
  • 239
  • 241
  • 251
  • 257
  • 263
  • 269
  • 271
  • 277
  • 281
  • 283
  • 293
  • 307
  • 311
  • 313
  • 317
  • 331
  • 337
  • 347
  • 349
  • 353
  • 359
  • 367
  • 373
  • 379
  • 383
  • 389
  • 397
  • 401
  • 409
  • 419
  • 421
  • 431
  • 433
  • 439
  • 443
  • 449
  • 457
  • 461
  • 463
  • 467
  • 479
  • 487
  • 491
  • 499
  • 503
  • 509
  • 521
  • 523
  • 541
  • 547
  • 557
  • 563
  • 569
  • 571
  • 577
  • 587
  • 593
  • 599
  • 601
  • 607
  • 613
  • 617
  • 619
  • 631
  • 641
  • 643
  • 647
  • 653
  • 659
  • 661
  • 673
  • 677
  • 683
  • 691
  • 701
  • 709
  • 719
  • 727
  • 733
  • 739
  • 743
  • 751
  • 757
  • 761
  • 769
  • 773
  • 787
  • 797
  • 809
  • 811
  • 821
  • 823
  • 827
  • 829
  • 839
  • 853
  • 857
  • 859
  • 863
  • 877
  • 881
  • 883
  • 887
  • 907
  • 911
  • 919
  • 929
  • 937
  • 941
  • 947
  • 953
  • 967
  • 971
  • 977
  • 983
  • 991
  • 997