20

CHAPTER 4. SIEVES
2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

Figure 4.1: Using the prime 2 to sieve for primes up to 100
Since all the even numbers greater than two are eliminated as being composite
numbers and not primes they appear as gray in Figure 4.1, but none of the odd
numbers are eliminated so they still appear in white boxes.
3

5

7

9

11

13

15

17

19

21

23

25

27

29

31

33

35

37

39

41

43

45

47

49

51

53

55

57

59

61

63

65

67

69

71

73

75

77

79

81

83

85

87

89

91

93

95

97

99

2

Figure 4.2: Using the primes 2 and 3 to sieve for primes up to 100
2
11

3
23

31
41

37

55

73

49
59

67
77

85
95

19
29

47
65

83
91

25
35

61

7
17

43
53

71

5

13

79
89

97

Figure 4.3: Using the primes 2,3,5 to sieve for primes up to 100
Looking at Figure 4.3, we see that for all but six numbers up to 100 we have
(after sieving by 2,3, and 5) determined which are primes and which composite.

