0

How do you show that the set of prime numbers is countably infinite?

Intuitively, I know that it should be countably infinite because a set of natural numbers is countably infinite. However, I don't know how to show it formally.

Fade In
  • 23
  • "A" set, or "the" set? i.e. a specific set of primes or all prime numbers? If the former, we'll be better off helping you if you specified which – PrincessEev Jan 01 '19 at 10:27
  • Sorry, it's the latter. I've clarified it in the body. – Fade In Jan 01 '19 at 10:29
  • 5
    Subset of $\mathbb{Z}$ gives countable. Euclid's argument gives infinite. – twnly Jan 01 '19 at 10:29
  • It would also be helpful if you clarified your attempts at this or understanding of this in the OP (emphasis on the former). For example, are you familiar with the concept of the cardinality of a set, and that the integers are countably infinite? And that there are indeed infinitely many primes? If so, the proof is very simple. – PrincessEev Jan 01 '19 at 10:30
  • I know that intuitively, it's countably infinite because it's a subset of the set of natural numbers which is countably infinite. I'm struggling with proving it formally. – Fade In Jan 01 '19 at 10:32
  • 1
    That is in fact a formal argument. –  Jan 01 '19 at 10:35
  • Maybe this too is relevant: https://math.stackexchange.com/questions/107617/an-infinite-subset-of-a-countable-set-is-countable for another formal method to approach this problem. – twnly Jan 01 '19 at 10:40
  • Are you allowed to take the fact that every subset of a countable set is countable as already known, or are you wanting to prove that first so you can use it? – timtfj Jan 01 '19 at 11:29
  • I'm not sure, but I wouldn't mind knowing the proof for that as well. – Fade In Jan 01 '19 at 11:41
  • 1
    @FadeIn The usual proof involves indexing the items of the main set to count them (eg $x_1,x_2,...$) then looking at the subset of $\mathbb N$ that contains the indices of the ones in your subset. The indices can be called $n_1,n_2$ etc by working up from the smallest one (at each stage, choose the smallest remaining one as the next one). Then show that the result is indeed a bijection. But you might as well let prime numbers be your subset of $\mathbb N$, instead of a set of indices, and do the proof directly on them. – timtfj Jan 01 '19 at 15:19

1 Answers1

5

Given that the Prime Numbers are a subset of the Natural Numbers and (by definition) the latter are countably infinite, the Primes cannot be uncountably infinite; their cardinality must be less than or equal to that of $\mathbb{N}$. By Euclid's proof there are infinitely many primes, therefore there can only be countably infinitely many primes.