# Prime number generator

**URL:** <https://boards.straightdope.com/t/prime-number-generator/736573>\
**Category:** Factual Questions\
**Created:** [November 4, 2015, 12:39am UTC](https://boards.straightdope.com/t/prime-number-generator/736573 "2015-11-04T00:39:15Z")\
**Posts on this page:** 4\
**Page:** 3

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 9, 2015, 3:54pm UTC](https://boards.straightdope.com/t/prime-number-generator/736573/41 "2015-11-09T15:54:43Z")

</div>

Speaking of primes, is it true that  
12 = (1-3)_(1-5)_(1-7)_(1-11)_(1-13)_(1-17)_(1-19) …  
where the right-side infinite product has terms for all odd primes?

Just asking.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 9, 2015, 4:12pm UTC](https://boards.straightdope.com/t/prime-number-generator/736573/42 "2015-11-09T16:12:56Z")

</div>

Well, first of all, we’re going to have to introduce some sort of nonstanard convention for evaluating infinite products, as under the standard convention, that product doesn’t converge (it alternates in sign, and grows monotonically in absolute value). The answer to your question, then, might depends on what convention we use for evaluating it.

But there might be some extension of the concept of infinite products where that’s a true statement, similarly to how 1+2+3+4+5+… = -1/12 or 1+2+4+8+16+… = -1.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 9, 2015, 4:50pm UTC](https://boards.straightdope.com/t/prime-number-generator/736573/43 "2015-11-09T16:50:25Z")

</div>

Indeed, it follows from the two sums at the end of **Chronos** ’s post, in a suitable sense: multiplying (1 + 2 + 3 + 4 + 5 + …) by (1 - 3) amounts to removing all the terms which are multiples of 3; then multiplying by (1 - 5) amounts to removing the remaining terms which are multiples of 5; continuing in this way with each odd prime, we are left with just the terms 1 + 2 + 4 + 8 + 16 + …

Thus, taking 1 + 2 + 3 + 4 + 5 + … to be -1/12 and 1 + 2 + 4 + 8 + 16 + … to be -1 (in senses as explained at length in other threads here on the SDMB), we may correspondingly consider the product of (1 - p) over the odd primes p to be -1/(-1/12) = 12.

---

<div class="post-metadata">

**Author:** ![tacos4all](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@tacos4all](https://boards.straightdope.com/u/tacos4all)\
**Post date:** [November 10, 2015, 3:37pm UTC](https://boards.straightdope.com/t/prime-number-generator/736573/44 "2015-11-10T15:37:43Z")

</div>

[http://alumnus.caltech.edu/~chamness/prime.html](http://alumnus.caltech.edu/~chamness/prime.html)  
Go to this website for an applet that will generate primes for you.

[Previous page](https://boards.straightdope.com/t/prime-number-generator/736573.md?page=2)
