Expressing infinite amounts [duplicate]
Your first sentence is correct, but has the stylistic disadvantage of repeating the word "number". Your second sentence is wrong; "infinite" is usually only applied as an adjective to uncountable nouns (e.g., "infinite space"). The standard way to rephrase the first sentence without repeating the word "number" is
There are infinitely many prime numbers.
I think people are split on whether you should say, "There is an infinite number of ..." or "There are an infinite number of ..."
I think this problem generally exists when using "number" and similar words to express a quantity. Here's the Google Ngram on "is a large number" versus "are a large number"; note "are" has about twice as many.
Similarly, in this Ngram "are an infinite number of" beats "is an infinite number of".
As others note, you can't say "There are infinite prime numbers" in the sense you mean. that statement as worded would mean that there exist prime numbers that are infinite, which doesn't really make sense. There is no single word that I know of that can be fit into that sentence in place of "infinite" to express the idea that you want. Dictionary definitions might lead you to write, "There are infinity prime numbers", but no one actually says that.
If you dislike repeating the word "number", you could always say, "There are an infinite number of primes." Of course that solution relies on the fact that "prime" can be used as a noun synonymous with "prime number", a fact that wouldn't work in other cases. Like, "There are an infinite number of perfect numbers". You can't say, "There are an infinite number of perfects", that's just not an accepted term.