With many hackers posing threats to the data like credit cards, medical information, Whatsapp, etc., numbers, like prime and composite numbers, are playing a vital role in encryption. Let us first know what exactly it means by Prime and Composite numbers and then see how it exactly is used in real-time.
Since the two may be slightly confusing, it is crucial to understand the comparison between Prime vs Composite Numbers.
What is a number?
The number is a mathematical value that can be denoted in a word, symbol or even a figure that speaks about the amount of a particular thing.
How are numbers categorized?
Numbers are categorized into number systems and include the following major types:
What are Prime and Composite numbers?
Prime numbers: A natural number greater than one and can be divided by one and itself without any remainder (it has only two factors itself and one). It is not a product of any smaller natural number but itself.
Read: Finding the successor and predecessor of numbers
As per Euclid’s theorem, there are infinitely many Prime numbers.
Example: Two is Prime because it can be divided by two or one only without any remainder, and factors of two are one and two
Table with list of Prime numbers from 1-1000
Number range | Prime numbers |
1-10 | 2, 3, 5, 7 |
11-20 | 11, 13, 17, 19 |
21-30 | 23, 29 |
31-40 | 31, 37 |
41-50 | 41, 43, 47 |
51-60 | 53, 59 |
61-70 | 61, 67 |
71-80 | 71, 73, 79 |
81-90 | 83, 89 |
91-100 | 97 |
101 – 200 | 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199 |
201 – 300 | 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293 |
301 – 400 | 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397 |
401 – 500 | 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499 |
501 – 600 | 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599 |
601 – 700 | 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691 |
701 – 800 | 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797 |
801 – 900 | 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887 |
901 – 1000 | 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 |
Total Prime numbers from 1-1000 | 168 |
Things to remember about Prime numbers:
- The smallest Prime number known is 2 (the rest have three factors 1, 2 and themselves).
- It is the only even prime number as well.
- The largest Prime number is known to date (November 2021) is 282,589,933 – 1. It has 24,862,048 digits on writing in base 10 form (Great Internet Mersenne Prime Search contribution)
- 1 has only one factor itself, so it is not a Prime number.
- A number becomes divisible by three if the sum of that number’s digits is a multiple of three.
- There is no prime number that is greater than 5 and ends in 5
Method to check if it’s a Prime number
Method 1: Dividing by two if you get the whole number, then it is unlikely to be a Prime number
Example: 5/2 does not give a whole number, so 5 is a prime number
Method 2: Every Prime number greater than three satisfies the condition 6n ± 1 (n=natural number)
Example: 6(3)+1=19
Method 3: If the number is greater than 40, replace that number in the place of n in the formula given below
n2+n+41. This formula claims for any positive integer ‘n’. This formula is Prime.
Example:22+2+41=47
Composite numbers: A natural number greater than one and can be divided by at least one number other than one and itself. It can be formed by multiplying small natural numbers (It has more than two factors).
Example: Four is a Composite number because it can be divided by one, two, as well as four and has factors one, two, four
Table showing list of Composite numbers from 1-1000
Number range | Composite numbers |
1-10 | 4, 6, 8, 9, 10 |
11-20 | 12, 14, 15, 16, 18, 20 |
21-30 | 21, 22, 24, 25, 26, 27, 28, 30 |
31-40 | 32, 33, 34, 35, 36, 38, 39, 40 |
41-50 | 42, 44, 45, 46, 48, 49, 50 |
51-60 | 51, 52, 54, 55, 56, 57, 58, 60 |
61-70 | 62, 63, 64, 65, 66, 68, 69, 70 |
71-80 | 72, 74, 75, 76, 77, 78, 80 |
81-90 | 81, 82, 84, 85, 86, 87, 88, 90 |
91-100 | 91, 92, 93, 94, 95, 96, 98, 99, 100 |
101-200 | 102, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 152, 153, 154, 155, 156, 158, 159, 160, 161, 162, 164, 165, 166, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 194, 195, 196, 198, 200 |
201-300 | 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 224, 225, 226, 228, 230, 231, 232, 234, 235, 236, 237, 238, 240, 242, 243, 244, 245, 246, 247, 248, 249, 250, 252, 253, 254, 255, 256, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 270, 272, 273, 274, 275, 276, 278, 279, 280, 282, 284, 285, 286, 287, 288, 289, 290, 291, 292, 294, 295, 296, 297, 298, 299, 300 |
301-400 | 301, 302, 303, 304, 305, 306, 308, 309, 310, 312, 314, 315, 316, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 332, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 348, 350, 351, 352, 354, 355, 356, 357, 358, 360, 361, 362, 363, 364, 365, 366, 368, 369, 370, 371, 372, 374, 375, 376, 377, 378, 380, 381, 382, 384, 385, 386, 387, 388, 390, 391, 392, 393, 394, 395, 396, 398, 399, 400 |
401-500 | 402, 403, 404, 405, 406, 407, 408, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 422, 423, 424, 425, 426, 427, 428, 429, 430, 432, 434, 435, 436, 437, 438, 440, 441, 442, 444, 445, 446, 447, 448, 450, 451, 452, 453, 454, 455, 456, 458, 459, 460, 462, 464, 465, 466, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 488, 489, 490, 492, 493, 494, 495, 496, 497, 498, 500 |
501-600 | 501, 502, 504, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 522, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 542, 543, 544, 545, 546, 548, 549, 550, 551, 552, 553, 554, 555, 556, 558, 559, 560, 561, 562, 564, 565, 566, 567, 568, 570, 572, 573, 574, 575, 576, 578, 579, 580, 581, 582, 583, 584, 585, 586, 588, 589, 590, 591, 592, 594, 595, 596, 597, 598, 600 |
601-700 | 602, 603, 604, 605, 606, 608, 609, 610, 611, 612, 614, 615, 616, 618, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 632, 633, 634, 635, 636, 637, 638, 639, 640, 642, 644, 645, 646, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 660, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 678, 679, 680, 681, 682, 684, 685, 686, 687, 688, 689, 690, 692, 693, 694, 695, 696, 697, 698, 699, 700 |
701-800 | 702, 703, 704, 705, 706, 707, 708, 710, 711, 712, 713, 714, 715, 716, 717, 718, 720, 721, 722, 723, 724, 725, 726, 728, 729, 730, 731, 732, 734, 735, 736, 737, 738, 740, 741, 742, 744, 745, 746, 747, 748, 749, 750, 752, 753, 754, 755, 756, 758, 759, 760, 762, 763, 764, 765, 766, 767, 768, 770, 771, 772, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 788, 789, 790, 791, 792, 793, 794, 795, 796, 798, 799, 800 |
801-900 | 801, 802, 803, 804, 805, 806, 807, 808, 810, 812, 813, 814, 815, 816, 817, 818, 819, 820, 822, 824, 825, 826, 828, 830, 831, 832, 833, 834, 835, 836, 837, 838, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 854, 855, 856, 858, 860, 861, 862, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 878, 879, 880, 882, 884, 885, 886, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900 |
901-1000 | 901, 902, 903, 904, 905, 906, 908, 909, 910, 912, 913, 914, 915, 916, 917, 918, 920, 921, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 933, 934, 935, 936, 938, 939, 940, 942, 943, 944, 945, 946, 948, 949, 950, 951, 952, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 968, 969, 970, 972, 973, 974, 975, 976, 978, 979, 980, 981, 982, 984, 985, 986, 987, 988, 989, 990, 992, 993, 994, 995, 996, 998, 999, 1000 |
Things to remember about Composite numbers:
v 4 is the smallest of all Composite numbers
v More than two factors are present for a composite number
v Every Composite number has two Prime numbers as its factors (Eg. 8= 2 x 4, where 2 and 4 are Prime numbers)
v They can be divided evenly by smaller integers
v We can write Composite numbers as the product of Prime numbers
Types of Composite numbers: There are different ways to classify composite numbers. These are some ways
- Based on the number of Prime factors:
- Semiprime Composite numbers: have two Prime factors (factors need not be distinct)
Example: 4, 6, 9, 10
- Squarefree semiprimes are semiprimes with squarefree numbers
Example: 6,10, 14, 15
- Sphenic Composite numbers: has three Prime factors and are distinct
Example: 40 (40 = 2 × 4 × 5)
- Odd Composite numbers: Integers that are odd numbers and are not Prime numbers.
- It has an odd number of distinct Prime factors
Example: 21, 25, 27
- Even Composite numbers: Integers that are even and are not Prime numbers
- It has an even number of distinct Prime factors
Example: 4, 8, 10, 12
- Based on the position of prime factors above or below some Prime number
- Smooth number
- Rough number
Method to check if it’s a Composite number
- By number of factors: More than two factors means it’s a Composite number
Example: 30 (2 × 3 × 5 more than two factors)
- By divisibility: Divide the numbers to check if the number gets divided by another number completely with no remainder.
Example: 64 gets completed divided by 2 with no remainder, so it is a Composite number
Differences between Prime and Composite numbers:
Prime number | Composite number |
Divisible only by one and itself | Divisible by more numbers than one and itself |
They have two factors | They have more than two factors |
Two is the smallest in the group | Four is the smallest in the group |
Example:2, 3, 5 | Example:4, 6, 9 |
Conclusion
We now know Prime numbers can be divided by themselves, and 1 and Composite numbers are obtained when multiplying two Prime numbers. This is applied in the encryption of credit cards, medical data, and many more data to be kept secure. Encryption codes in the form of Composite numbers are designed using algorithms by engineers.
Read: Most effective tips to Prepare for Class 10th Maths Olympiad
The computer recognizes these codes. But the factors used are known by users only. Hackers need to identify these by trial and error methods that need a very long period as Composite numbers are very large. This ensures data is safe with organizations that have created it.