# This Prime Generating Product generates successive prime factors

Any integer greater than 1 is called a prime number if and only if its positive factors are 1 and the number p itself.

– The Editor

via xkcd

## Prime Generating Formulas

We all know how hard it is to predict a formula for prime numbers! They have extremely uncertain pattern at various number ranges. Some prime numbers may have difference of hundreds, while few others are as close as possible. Mathematicians and computer scientists have worked very well for a long time to discover more prime numbers and tried hard to compute a unique formula. But as there are no certain patterns, it remains difficult to discover exactly the next prime number after a certain prime. There are still some ideas available which help mathematics majors predict patterns in prime numbers.

I have already discussed two such (flawed) ideas about prime numbers generation. You can revisit them:

The third idea, originally commented by Huen Yeong Kong,$forms an accurate sequence of prime numbers. It is very extensive and appears to be true at all my computational limits. The prime factorization of product of all 2i ‘s ($i=1, 2, 3, \ldots $), i.e., factor ($\displaystyle{\prod_{i=1}^n} 2i , n \in \mathbb{Z}^+$), gives all consecutive prime numbers in a sequence. As an example, take$n=1$, we have$\displaystyle{\prod_{i=1}^1} 2i=2$. Therefore,$\text{factor}\prod_{i=1}^1 2i$=2. Similarly, for n=2, as$\displaystyle{\prod_{i=1}^2} 2i=8$, we have$\text{factor}\prod_{i=1}^2 2i$= 2. Again, for n=3, as$\displaystyle{\prod_{i=1}^3} 2i=48$, we have$\text{factor}\prod_{i=1}^3 2i$= 2,3. On continuing the same for different increasing values of n, factors containing sequence of consecutive primes: 2, 3, 5, 7, 11, 13, … were obtained. The greatest (final) terms of these sequences were always less than or equal to value of chosen n. With Maxima for Windows, a calculation beyond n=~14000 isn’t possible for this expression. For n=13000, the prime generating product$\displaystyle{\prod_{i=1}^{13000}} 2i$was factored by writing factor(product(2*i,i,1,100000)); in Maxima software, which yielded the following prime factors of the number$\displaystyle{\prod_{i=1}^{13000}} 2i\$:

2^25994, 3^6494, 5^3248, 7^2164, 11^1297, 13^1081, 17^810, 19^721, 23^590, 29^463, 31^432, 37^360, 41^324, 43^309, 47^281, 53^249, 59^223, 61^216, 67^196, 71^185, 73^180, 79^166, 83^157, 89^147, 97^135, 101^129, 103^127, 107^122, 109^120, 113^116, 127^102, 131^99, 137^94, 139^93, 149^87, 151^86, 157^82, 163^79, 167^77, 173^75, 179^72, 181^71, 191^68, 193^67, 197^65, 199^65, 211^61, 223^58, 227^57, 229^56, 233^55, 239^54, 241^53, 251^51, 257^50, 263^49, 269^48, 271^47, 277^46, 281^46, 283^45, 293^44, 307^42, 311^41, 313^41, 317^41, 331^39, 337^38, 347^37, 349^37, 353^36, 359^36, 367^35, 373^34, 379^34, 383^33, 389^33, 397^32, 401^32, 409^31, 419^31, 421^30, 431^30, 433^30, 439^29, 443^29, 449^28, 457^28, 461^28, 463^28, 467^27, 479^27, 487^26, 491^26, 499^26, 503^25, 509^25, 521^24, 523^24, 541^24, 547^23, 557^23, 563^23, 569^22, 571^22, 577^22, 587^22, 593^21, 599^21, 601^21, 607^21, 613^21, 617^21, 619^21, 631^20, 641^20, 643^20, 647^20, 653^19, 659^19, 661^19, 673^19, 677^19, 683^19, 691^18, 701^18, 709^18, 719^18, 727^17, 733^17, 739^17, 743^17, 751^17, 757^17, 761^17, 769^16, 773^16, 787^16, 797^16, 809^16, 811^16, 821^15, 823^15, 827^15, 829^15, 839^15, 853^15, 857^15, 859^15, 863^15, 877^14, 881^14, 883^14, 887^14, 907^14, 911^14, 919^14, 929^13, 937^13, 941^13, 947^13, 953^13, 967^13, 971^13, 977^13, 983^13, 991^13, 997^13, 1009^12, 1013^12, 1019^12, 1021^12, 1031^12, 1033^12, 1039^12, 1049^12, 1051^12, 1061^12, 1063^12, 1069^12, 1087^11, 1091^11, 1093^11, 1097^11, 1103^11, 1109^11, 1117^11, 1123^11, 1129^11, 1151^11, 1153^11, 1163^11, 1171^11, 1181^11, 1187^10, 1193^10, 1201^10, 1213^10, 1217^10, 1223^10, 1229^10, 1231^10, 1237^10, 1249^10, 1259^10, 1277^10, 1279^10, 1283^10, 1289^10, 1291^10, 1297^10, 1301^9, 1303^9, 1307^9, 1319^9, 1321^9, 1327^9, 1361^9, 1367^9, 1373^9, 1381^9, 1399^9, 1409^9, 1423^9, 1427^9, 1429^9, 1433^9, 1439^9, 1447^8, 1451^8, 1453^8, 1459^8, 1471^8, 1481^8, 1483^8, 1487^8, 1489^8, 1493^8, 1499^8, 1511^8, 1523^8, 1531^8, 1543^8, 1549^8, 1553^8, 1559^8, 1567^8, 1571^8, 1579^8, 1583^8, 1597^8, 1601^8, 1607^8, 1609^8, 1613^8, 1619^8, 1621^8, 1627^7, 1637^7, 1657^7, 1663^7, 1667^7, 1669^7, 1693^7, 1697^7, 1699^7, 1709^7, 1721^7, 1723^7, 1733^7, 1741^7, 1747^7, 1753^7, 1759^7, 1777^7, 1783^7, 1787^7, 1789^7, 1801^7, 1811^7, 1823^7, 1831^7, 1847^7, 1861^6, 1867^6, 1871^6, 1873^6, 1877^6, 1879^6, 1889^6, 1901^6, 1907^6, 1913^6, 1931^6, 1933^6, 1949^6, 1951^6, 1973^6, 1979^6, 1987^6, 1993^6, 1997^6, 1999^6, 2003^6, 2011^6, 2017^6, 2027^6, 2029^6, 2039^6, 2053^6, 2063^6, 2069^6, 2081^6, 2083^6, 2087^6, 2089^6, 2099^6, 2111^6, 2113^6, 2129^6, 2131^6, 2137^6, 2141^6, 2143^6, 2153^6, 2161^6, 2179^5, 2203^5, 2207^5, 2213^5, 2221^5, 2237^5, 2239^5, 2243^5, 2251^5, 2267^5, 2269^5, 2273^5, 2281^5, 2287^5, 2293^5, 2297^5, 2309^5, 2311^5, 2333^5, 2339^5, 2341^5, 2347^5, 2351^5, 2357^5, 2371^5, 2377^5, 2381^5, 2383^5, 2389^5, 2393^5, 2399^5, 2411^5, 2417^5, 2423^5, 2437^5, 2441^5, 2447^5, 2459^5, 2467^5, 2473^5, 2477^5, 2503^5, 2521^5, 2531^5, 2539^5, 2543^5, 2549^5, 2551^5, 2557^5, 2579^5, 2591^5, 2593^5, 2609^4, 2617^4, 2621^4, 2633^4, 2647^4, 2657^4, 2659^4, 2663^4, 2671^4, 2677^4, 2683^4, 2687^4, 2689^4, 2693^4, 2699^4, 2707^4, 2711^4, 2713^4, 2719^4, 2729^4, 2731^4, 2741^4, 2749^4, 2753^4, 2767^4, 2777^4, 2789^4, 2791^4, 2797^4, 2801^4, 2803^4, 2819^4, 2833^4, 2837^4, 2843^4, 2851^4, 2857^4, 2861^4, 2879^4, 2887^4, 2897^4, 2903^4, 2909^4, 2917^4, 2927^4, 2939^4, 2953^4, 2957^4, 2963^4, 2969^4, 2971^4, 2999^4, 3001^4, 3011^4, 3019^4, 3023^4, 3037^4, 3041^4, 3049^4, 3061^4, 3067^4, 3079^4, 3083^4, 3089^4, 3109^4, 3119^4, 3121^4, 3137^4, 3163^4, 3167^4, 3169^4, 3181^4, 3187^4, 3191^4, 3203^4, 3209^4, 3217^4, 3221^4, 3229^4, 3251^3, 3253^3, 3257^3, 3259^3, 3271^3, 3299^3, 3301^3, 3307^3, 3313^3, 3319^3, 3323^3, 3329^3, 3331^3, 3343^3, 3347^3, 3359^3, 3361^3, 3371^3, 3373^3, 3389^3, 3391^3, 3407^3, 3413^3, 3433^3, 3449^3, 3457^3, 3461^3, 3463^3, 3467^3, 3469^3, 3491^3, 3499^3, 3511^3, 3517^3, 3527^3, 3529^3, 3533^3, 3539^3, 3541^3, 3547^3, 3557^3, 3559^3, 3571^3, 3581^3, 3583^3, 3593^3, 3607^3, 3613^3, 3617^3, 3623^3, 3631^3, 3637^3, 3643^3, 3659^3, 3671^3, 3673^3, 3677^3, 3691^3, 3697^3, 3701^3, 3709^3, 3719^3, 3727^3, 3733^3, 3739^3, 3761^3, 3767^3, 3769^3, 3779^3, 3793^3, 3797^3, 3803^3, 3821^3, 3823^3, 3833^3, 3847^3, 3851^3, 3853^3, 3863^3, 3877^3, 3881^3, 3889^3, 3907^3, 3911^3, 3917^3, 3919^3, 3923^3, 3929^3, 3931^3, 3943^3, 3947^3, 3967^3, 3989^3, 4001^3, 4003^3, 4007^3, 4013^3, 4019^3, 4021^3, 4027^3, 4049^3, 4051^3, 4057^3, 4073^3, 4079^3, 4091^3, 4093^3, 4099^3, 4111^3, 4127^3, 4129^3, 4133^3, 4139^3, 4153^3, 4157^3, 4159^3, 4177^3, 4201^3, 4211^3, 4217^3, 4219^3, 4229^3, 4231^3, 4241^3, 4243^3, 4253^3, 4259^3, 4261^3, 4271^3, 4273^3, 4283^3, 4289^3, 4297^3, 4327^3, 4337^2, 4339^2, 4349^2, 4357^2, 4363^2, 4373^2, 4391^2, 4397^2, 4409^2, 4421^2, 4423^2, 4441^2, 4447^2, 4451^2, 4457^2, 4463^2, 4481^2, 4483^2, 4493^2, 4507^2, 4513^2, 4517^2, 4519^2, 4523^2, 4547^2, 4549^2, 4561^2, 4567^2, 4583^2, 4591^2, 4597^2, 4603^2, 4621^2, 4637^2, 4639^2, 4643^2, 4649^2, 4651^2, 4657^2, 4663^2, 4673^2, 4679^2, 4691^2, 4703^2, 4721^2, 4723^2, 4729^2, 4733^2, 4751^2, 4759^2, 4783^2, 4787^2, 4789^2, 4793^2, 4799^2, 4801^2, 4813^2, 4817^2, 4831^2, 4861^2, 4871^2, 4877^2, 4889^2, 4903^2, 4909^2, 4919^2, 4931^2, 4933^2, 4937^2, 4943^2, 4951^2, 4957^2, 4967^2, 4969^2, 4973^2, 4987^2, 4993^2, 4999^2, 5003^2, 5009^2, 5011^2, 5021^2, 5023^2, 5039^2, 5051^2, 5059^2, 5077^2, 5081^2, 5087^2, 5099^2, 5101^2, 5107^2, 5113^2, 5119^2, 5147^2, 5153^2, 5167^2, 5171^2, 5179^2, 5189^2, 5197^2, 5209^2, 5227^2, 5231^2, 5233^2, 5237^2, 5261^2, 5273^2, 5279^2, 5281^2, 5297^2, 5303^2, 5309^2, 5323^2, 5333^2, 5347^2, 5351^2, 5381^2, 5387^2, 5393^2, 5399^2, 5407^2, 5413^2, 5417^2, 5419^2, 5431^2, 5437^2, 5441^2, 5443^2, 5449^2, 5471^2, 5477^2, 5479^2, 5483^2, 5501^2, 5503^2, 5507^2, 5519^2, 5521^2, 5527^2, 5531^2, 5557^2, 5563^2, 5569^2, 5573^2, 5581^2, 5591^2, 5623^2, 5639^2, 5641^2, 5647^2, 5651^2, 5653^2, 5657^2, 5659^2, 5669^2, 5683^2, 5689^2, 5693^2, 5701^2, 5711^2, 5717^2, 5737^2, 5741^2, 5743^2, 5749^2, 5779^2, 5783^2, 5791^2, 5801^2, 5807^2, 5813^2, 5821^2, 5827^2, 5839^2, 5843^2, 5849^2, 5851^2, 5857^2, 5861^2, 5867^2, 5869^2, 5879^2, 5881^2, 5897^2, 5903^2, 5923^2, 5927^2, 5939^2, 5953^2, 5981^2, 5987^2, 6007^2, 6011^2, 6029^2, 6037^2, 6043^2, 6047^2, 6053^2, 6067^2, 6073^2, 6079^2, 6089^2, 6091^2, 6101^2, 6113^2, 6121^2, 6131^2, 6133^2, 6143^2, 6151^2, 6163^2, 6173^2, 6197^2, 6199^2, 6203^2, 6211^2, 6217^2, 6221^2, 6229^2, 6247^2, 6257^2, 6263^2, 6269^2, 6271^2, 6277^2, 6287^2, 6299^2, 6301^2, 6311^2, 6317^2, 6323^2, 6329^2, 6337^2, 6343^2, 6353^2, 6359^2, 6361^2, 6367^2, 6373^2, 6379^2, 6389^2, 6397^2, 6421^2, 6427^2, 6449^2, 6451^2, 6469^2, 6473^2, 6481^2, 6491^2, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, 12941, 12953, 12959, 12967, 12973, 12979, 12983.

Above sequence contains each and every prime from 1 to 12985. This prime generating product may fail to produce such sequences at higher limits but still it is way better than Euler’s prime generating polynomial.

Gaurav Tiwari

A designer by profession, a mathematician by education but a Blogger by hobby. With an experience of over seven years with WordPress, PHP and CSS3, Gaurav is capable of doing almost anything related to these. Beyond that, He is a mathematics graduate & a civil service aspirant.

### 2 Responses

1. fhtagn says:

Factorization of 1*2*3*4*5*6*7*8*9*10*…*n also yields every prime number in that interval. You put prime numbers in a product and they’re really in there, how fascinating!