What is the largest primorial fitting in a 32 bit signed int?
Let the prime numbers be \(p_1 = 2, p_2 = 3, p_3 = 5, \ldots\). The primorial \(p_k\#\) is \(p_1p_2\cdots p_k\). What is the largest primorial that fits in a 32 bit signed int?
The largest value a 32 bit signed int can hold is \(2^{31}-1 = 2147483647\), and \(p_9\# = 2\cdot 3\cdot 5\cdot 7\cdot 11\cdot 13\cdot 17\cdot 19\cdot 23 = 223092870\) is the largest promorial less than or equal to this.
A 64 bit signed long has maximum value \(2^{63}-1 = 9223372036854775807\) and the largest primorial greater than or equal to that is \(p_{16}\# = 2\cdot 3 \cdots 53 = 614889782588491410\).