Good prime
A good prime is a prime number whose square is greater than the product of any two primes at the same number of positions before and after it in the sequence of primes.
A good prime satisfies the inequality
for all 1 ≤ i ≤ n−1. pn is the nth prime.
Example: The first primes are 2, 3, 5, 7 and 11. As for 5 both possible conditions
are fulfilled, 5 is a good prime.
There are infinitely many good primes.[1] The first few good primes are
List of the first 2500 Good Primes
[5, 11, 17, 29, 37, 41, 53, 59, 67, 71, 79, 97, 101, 107, 127, 137, 149, 157, 163, 173, 179, 191, 197, 211, 223, 227, 239, 251, 257, 263, 269, 277, 281, 307, 311, 331, 347, 367, 373, 379, 397, 419, 431, 439, 457, 461, 479, 487, 499, 521, 541, 557, 563, 569, 587, 593, 599, 607, 613, 617, 631, 641, 653, 659, 673, 701, 719, 727, 733, 739, 751, 757, 769, 787, 809, 821, 827, 853, 857, 877, 881, 907, 929, 937, 947, 967, 977, 991, 1009, 1019, 1031, 1049, 1061, 1087, 1091, 1103, 1117, 1123, 1151, 1163, 1181, 1187, 1213, 1223, 1229, 1249, 1277, 1289, 1297, 1301, 1319, 1361, 1367, 1399, 1423, 1427, 1447, 1451, 1471, 1481, 1487, 1511, 1523, 1543, 1549, 1567, 1579, 1597, 1607, 1619, 1657, 1663, 1667, 1693, 1697, 1721, 1733, 1741, 1747, 1753, 1777, 1783, 1787, 1801, 1823, 1847, 1861, 1867, 1871, 1877, 1901, 1907, 1931, 1949, 1973, 1987, 1993, 1997, 2011, 2027, 2053, 2063, 2081, 2087, 2111, 2129, 2137, 2141, 2153, 2203, 2237, 2267, 2281, 2287, 2293, 2309, 2333, 2339, 2347, 2371, 2377, 2381, 2389, 2411, 2417, 2437, 2459, 2467, 2473, 2503, 2521, 2531, 2539, 2549, 2579, 2591, 2609, 2617, 2647, 2657, 2671, 2677, 2683, 2687, 2707, 2711, 2729, 2741, 2749, 2767, 2789, 2797, 2801, 2819, 2833, 2851, 2857, 2879, 2897, 2903, 2953, 2963, 2969, 2999, 3011, 3019, 3037, 3061, 3079, 3109, 3119, 3163, 3167, 3181, 3187, 3203, 3217, 3251, 3257, 3299, 3307, 3313, 3319, 3329, 3343, 3359, 3371, 3389, 3407, 3433, 3449, 3457, 3461, 3467, 3491, 3511, 3527, 3539, 3557, 3571, 3581, 3607, 3613, 3631, 3637, 3659, 3671, 3691, 3697, 3719, 3727, 3733, 3761, 3767, 3793, 3821, 3847, 3851, 3877, 3907, 3917, 3929, 3943, 3989, 4001, 4013, 4019, 4049, 4073, 4091, 4127, 4153, 4157, 4201, 4211, 4217, 4229, 4241, 4253, 4259, 4271, 4283, 4327, 4337, 4349, 4357, 4391, 4409, 4421, 4441, 4447, 4457, 4481, 4507, 4513, 4517, 4547, 4561, 4583, 4591, 4597, 4621, 4637, 4649, 4657, 4673, 4691, 4721, 4729, 4751, 4783, 4787, 4799, 4813, 4861, 4871, 4903, 4931, 4951, 4967, 4987, 4993, 4999, 5009, 5021, 5039, 5051, 5077, 5099, 5107, 5113, 5147, 5167, 5189, 5227, 5231, 5261, 5273, 5279, 5297, 5303, 5323, 5347, 5381, 5387, 5393, 5407, 5413, 5417, 5431, 5437, 5441, 5471, 5477, 5501, 5519, 5527, 5557, 5563, 5569, 5623, 5639, 5647, 5651, 5657, 5683, 5689, 5711, 5737, 5741, 5779, 5801, 5807, 5821, 5839, 5849, 5857, 5867, 5879, 5897, 5923, 5981, 6007, 6029, 6037, 6043, 6067, 6073, 6089, 6113, 6131, 6143, 6163, 6197, 6211, 6217, 6247, 6257, 6263, 6269, 6299, 6311, 6317, 6323, 6337, 6353, 6359, 6367, 6373, 6389, 6421, 6449, 6469, 6521, 6547, 6551, 6563, 6569, 6577, 6599, 6637, 6653, 6659, 6673, 6689, 6701, 6733, 6761, 6779, 6791, 6823, 6827, 6857, 6863, 6869, 6899, 6907, 6947, 6959, 6967, 6977, 6991, 6997, 7013, 7039, 7057, 7069, 7103, 7121, 7127, 7151, 7177, 7187, 7207, 7211, 7229, 7237, 7243, 7283, 7297, 7307, 7321, 7331, 7349, 7393, 7411, 7451, 7457, 7477, 7487, 7499, 7517, 7523, 7537, 7547, 7559, 7573, 7583, 7589, 7603, 7639, 7669, 7681, 7687, 7699, 7717, 7723, 7741, 7753, 7757, 7789, 7817, 7823, 7841, 7867, 7873, 7877, 7901, 7919, 7927, 7933, 7949, 7993, 8009, 8039, 8053, 8081, 8087, 8111, 8117, 8147, 8161, 8167, 8209, 8219, 8231, 8263, 8269, 8287, 8291, 8311, 8353, 8363, 8387, 8419, 8429, 8443, 8461, 8501, 8513, 8521, 8537, 8563, 8573, 8597, 8623, 8627, 8641, 8663, 8677, 8689, 8707, 8713, 8731, 8737, 8747, 8779, 8803, 8819, 8831, 8837, 8861, 8887, 8923, 8929, 8963, 8969, 8999, 9007, 9011, 9029, 9041, 9059, 9091, 9103, 9127, 9133, 9151, 9157, 9173, 9181, 9199, 9221, 9239, 9277, 9281, 9311, 9319, 9337, 9341, 9371, 9391, 9397, 9413, 9419, 9431, 9437, 9461, 9473, 9491, 9511, 9533, 9547, 9587, 9601, 9613, 9619, 9629, 9643, 9677, 9689, 9719, 9733, 9739, 9767, 9781, 9787, 9803, 9811, 9829, 9851, 9857, 9871, 9883, 9901, 9923, 9929, 9941, 9967, 10007, 10037, 10061, 10067, 10091, 10099, 10133, 10139, 10151, 10159, 10177, 10211, 10243, 10253, 10267, 10271, 10289, 10301, 10313, 10331, 10357, 10391, 10427, 10453, 10457, 10477, 10499, 10529, 10559, 10589, 10597, 10607, 10627, 10651, 10657, 10663, 10687, 10709, 10723, 10729, 10771, 10781, 10831, 10847, 10853, 10859, 10883, 10889, 10903, 10937, 10949, 10973, 10987, 11027, 11047, 11057, 11069, 11083, 11113, 11117, 11149, 11159, 11171, 11197, 11239, 11251, 11257, 11273, 11299, 11311, 11317, 11351, 11369, 11383, 11393, 11411, 11437, 11443, 11467, 11483, 11489, 11497, 11519, 11549, 11579, 11587, 11593, 11617, 11657, 11677, 11699, 11717, 11731, 11777, 11801, 11807, 11821, 11827, 11831, 11863, 11887, 11897, 11903, 11923, 11933, 11939, 11953, 11969, 11981, 12007, 12037, 12041, 12071, 12097, 12107, 12143, 12157, 12161, 12197, 12227, 12239, 12251, 12263, 12277, 12323, 12343, 12373, 12377, 12391, 12401, 12409, 12433, 12451, 12473, 12487, 12497, 12511, 12539, 12547, 12569, 12577, 12583, 12601, 12611, 12637, 12647, 12653, 12689, 12697, 12713, 12739, 12757, 12781, 12791, 12821, 12841, 12889, 12907, 12917, 12941, 12953, 12967, 12973, 12979, 13001, 13007, 13033, 13043, 13093, 13099, 13121, 13147, 13159, 13171, 13177, 13183, 13217, 13241, 13259, 13291, 13309, 13327, 13337, 13367, 13397, 13411, 13417, 13441, 13451, 13457, 13463, 13513, 13553, 13567, 13591, 13613, 13627, 13669, 13679, 13687, 13691, 13709, 13721, 13751, 13757, 13781, 13799, 13829, 13859, 13873, 13877, 13901, 13931, 13963, 13997, 14009, 14029, 14051, 14071, 14081, 14143, 14149, 14173, 14197, 14243, 14249, 14281, 14293, 14321, 14341, 14369, 14387, 14401, 14407, 14419, 14431, 14447, 14479, 14519, 14533, 14543, 14549, 14557, 14561, 14591, 14621, 14627, 14653, 14699, 14713, 14731, 14737, 14747, 14753, 14767, 14779, 14813, 14821, 14827, 14843, 14867, 14879, 14887, 14923, 14939, 14947, 15013, 15053, 15073, 15101, 15121, 15131, 15137, 15161, 15187, 15193, 15217, 15227, 15259, 15269, 15287, 15299, 15307, 15313, 15329, 15349, 15359, 15373, 15427, 15439, 15461, 15467, 15493, 15527, 15541, 15551, 15581, 15601, 15619, 15641, 15647, 15661, 15667, 15679, 15727, 15731, 15737, 15761, 15767, 15787, 15797, 15803, 15817, 15859, 15877, 15887, 15901, 15907, 15913, 15919, 15959, 15971, 15991, 16001, 16033, 16057, 16061, 16067, 16087, 16097, 16127, 16139, 16183, 16187, 16217, 16223, 16229, 16249, 16267, 16301, 16319, 16333, 16361, 16411, 16417, 16427, 16447, 16451, 16477, 16487, 16519, 16547, 16561, 16567, 16603, 16619, 16631, 16649, 16657, 16691, 16699, 16729, 16741, 16759, 16787, 16811, 16823, 16829, 16871, 16879, 16901, 16921, 16927, 16937, 16963, 16979, 16987, 17011, 17021, 17027, 17041, 17047, 17077, 17093, 17117, 17159, 17183, 17189, 17203, 17207, 17231, 17291, 17317, 17327, 17351, 17377, 17383, 17387, 17417, 17431, 17443, 17467, 17477, 17483, 17489, 17509, 17539, 17569, 17579, 17597, 17623, 17657, 17681, 17707, 17729, 17747, 17783, 17789, 17827, 17837, 17851, 17881, 17903, 17909, 17921, 17957, 17971, 17977, 17987, 18041, 18047, 18059, 18077, 18089, 18119, 18127, 18131, 18143, 18169, 18181, 18191, 18211, 18217, 18223, 18229, 18251, 18287, 18301, 18307, 18311, 18329, 18341, 18367, 18397, 18427, 18433, 18439, 18451, 18457, 18481, 18493, 18517, 18521, 18539, 18583, 18617, 18661, 18671, 18691, 18713, 18731, 18743, 18773, 18787, 18793, 18839, 18859, 18899, 18911, 18917, 18947, 18973, 19001, 19009, 19031, 19069, 19079, 19121, 19139, 19157, 19181, 19207, 19211, 19231, 19249, 19259, 19267, 19289, 19301, 19373, 19379, 19387, 19417, 19421, 19427, 19441, 19457, 19463, 19469, 19477, 19483, 19501, 19531, 19541, 19553, 19571, 19577, 19597, 19603, 19661, 19681, 19697, 19709, 19739, 19751, 19759, 19793, 19813, 19841, 19853, 19861, 19889, 19913, 19949, 19961, 19973, 19991, 20011, 20021, 20047, 20063, 20089, 20101, 20107, 20113, 20123, 20143, 20147, 20161, 20173, 20201, 20219, 20231, 20249, 20261, 20287, 20323, 20341, 20347, 20353, 20357, 20389, 20407, 20431, 20441, 20477, 20507, 20521, 20533, 20543, 20549, 20593, 20627, 20639, 20663, 20681, 20707, 20717, 20731, 20743, 20747, 20771, 20807, 20849, 20873, 20897, 20921, 20939, 20959, 20981, 21001, 21011, 21017, 21059, 21089, 21101, 21139, 21157, 21163, 21179, 21187, 21191, 21211, 21221, 21269, 21277, 21313, 21317, 21341, 21377, 21391, 21397, 21467, 21481, 21487, 21491, 21499, 21517, 21521, 21557, 21587, 21599, 21611, 21647, 21661, 21673, 21701, 21727, 21737, 21751, 21767, 21787, 21799, 21817, 21839, 21851, 21859, 21911, 21929, 21937, 21961, 21977, 21991, 21997, 22027, 22037, 22051, 22063, 22073, 22091, 22109, 22123, 22129, 22147, 22153, 22157, 22189, 22229, 22247, 22259, 22271, 22277, 22303, 22343, 22367, 22381, 22391, 22433, 22441, 22447, 22469, 22481, 22501, 22531, 22541, 22567, 22571, 22613, 22619, 22637, 22669, 22691, 22697, 22709, 22717, 22739, 22769, 22777, 22783, 22807, 22853, 22859, 22871, 22901, 22937, 22961, 22993, 23003, 23011, 23017, 23027, 23039, 23053, 23057, 23081, 23117, 23131, 23159, 23167, 23189, 23197, 23201, 23251, 23269, 23291, 23311, 23321, 23327, 23333, 23357, 23369, 23399, 23417, 23447, 23497, 23531, 23537, 23549, 23557, 23561, 23581, 23593, 23599, 23623, 23627, 23663, 23669, 23687, 23719, 23741, 23761, 23767, 23789, 23801, 23813, 23827, 23831, 23857, 23869, 23887, 23893, 23909, 23957, 23971, 23977, 23993, 24001, 24019, 24043, 24061, 24071, 24077, 24091, 24097, 24103, 24107, 24133, 24169, 24179, 24197, 24223, 24239, 24247, 24317, 24329, 24359, 24371, 24407, 24413, 24419, 24439, 24469, 24499, 24509, 24527, 24547, 24593, 24611, 24623, 24659, 24671, 24677, 24691, 24733, 24749, 24763, 24781, 24793, 24841, 24847, 24877, 24907, 24917, 24943, 24967, 24977, 25013, 25031, 25057, 25073, 25087, 25111, 25117, 25147, 25163, 25169, 25183, 25219, 25229, 25237, 25243, 25301, 25307, 25339, 25367, 25391, 25409, 25439, 25447, 25453, 25463, 25469, 25523, 25537, 25561, 25577, 25601, 25621, 25633, 25639, 25657, 25667, 25673, 25693, 25733, 25741, 25759, 25793, 25799, 25841, 25847, 25867, 25889, 25903, 25913, 25931, 25939, 25969, 25997, 26017, 26041, 26083, 26099, 26107, 26111, 26141, 26153, 26171, 26177, 26183, 26203, 26227, 26249, 26261, 26293, 26309, 26317, 26339, 26387, 26393, 26417, 26431, 26449, 26479, 26489, 26497, 26539, 26557, 26591, 26627, 26641, 26669, 26681, 26693, 26699, 26711, 26723, 26729, 26759, 26777, 26801, 26813, 26833, 26861, 26879, 26891, 26921, 26947, 26951, 26981, 26987, 27011, 27031, 27059, 27067, 27073, 27091, 27103, 27107, 27127, 27179, 27191, 27239, 27253, 27271, 27277, 27281, 27329, 27361, 27397, 27407, 27427, 27449, 27479, 27509, 27527, 27539, 27581, 27611, 27647, 27673, 27689, 27697, 27733, 27737, 27749, 27763, 27773, 27791, 27799, 27817, 27823, 27847, 27883, 27893, 27917, 27941, 27961, 27983, 27997, 28019, 28027, 28051, 28069, 28081, 28097, 28109, 28151, 28181, 28201, 28211, 28277, 28307, 28349, 28387, 28403, 28409, 28429, 28463, 28493, 28513, 28537, 28547, 28571, 28591, 28597, 28603, 28619, 28627, 28643, 28657, 28661, 28687, 28697, 28723, 28751, 28789, 28807, 28813, 28837, 28859, 28867, 28901, 28921, 28927, 28949, 29009, 29017, 29021, 29059, 29101, 29123, 29129, 29147, 29167, 29173, 29191, 29201, 29207, 29221, 29243, 29269, 29287, 29297, 29327, 29333, 29383, 29387, 29399, 29423, 29437, 29473, 29527, 29567, 29581, 29599, 29629, 29663, 29669, 29717, 29741, 29753, 29759, 29789, 29819, 29833, 29851, 29863, 29873, 29879, 29917, 29947, 29983, 30011, 30047, 30059, 30089, 30097, 30103, 30109, 30133, 30137, 30161, 30181, 30197, 30241, 30253, 30269, 30293, 30307, 30313, 30319, 30341, 30389, 30427, 30449, 30467, 30491, 30509, 30529, 30553, 30557, 30577, 30631, 30637, 30643, 30661, 30671, 30689, 30697, 30703, 30757, 30773, 30803, 30829, 30839, 30851, 30869, 30931, 30937, 30971, 30977, 31013, 31033, 31051, 31063, 31079, 31121, 31139, 31147, 31151, 31177, 31181, 31189, 31219, 31231, 31247, 31267, 31307, 31319, 31327, 31333, 31379, 31387, 31391, 31469, 31477, 31511, 31531, 31541, 31567, 31601, 31627, 31643, 31657, 31663, 31687, 31721, 31727, 31741, 31769, 31793, 31847, 31873, 31883, 31957, 31973, 32003, 32027, 32051, 32057, 32077, 32083, 32117, 32141, 32159, 32173, 32183, 32189, 32203, 32233, 32251, 32257, 32297, 32321, 32341, 32353, 32359, 32369, 32377, 32401, 32411, 32423, 32441, 32467, 32479, 32491, 32497, 32503, 32531, 32561, 32569, 32603, 32609, 32647, 32687, 32707, 32713, 32717, 32749, 32771, 32779, 32797, 32801, 32831, 32839, 32869, 32909, 32933, 32939, 32957, 32969, 32983, 32993, 33013, 33023, 33049, 33071, 33083, 33107, 33113, 33149, 33179, 33191, 33199, 33287, 33301, 33311, 33329, 33343, 33347, 33377, 33391, 33403, 33409, 33457, 33479, 33487, 33521, 33529, 33563, 33577, 33587, 33599, 33613, 33617, 33637, 33679, 33703, 33713, 33739, 33749, 33767, 33791, 33809, 33827, 33851, 33857, 33889, 33911, 33923, 33931, 33937, 33961, 33997, 34019, 34031, 34057, 34123, 34127, 34141, 34157, 34171, 34211, 34253, 34259, 34267, 34297, 34301, 34313, 34351, 34361, 34367, 34403, 34421, 34457, 34469, 34483, 34499, 34511, 34537, 34543, 34583, 34589, 34603, 34631, 34649, 34667, 34673, 34687, 34721, 34739, 34757, 34807, 34841, 34847, 34871, 34877, 34913, 34939, 34961, 35023, 35051, 35081, 35099, 35107, 35129, 35141, 35149, 35201, 35221, 35251, 35279, 35311, 35317, 35323, 35353, 35381, 35393, 35401, 35419, 35437, 35447, 35491, 35507, 35521, 35527, 35531, 35569, 35591, 35671, 35729, 35747, 35753, 35797, 35801, 35831, 35837, 35851, 35863, 35897, 35911, 35923, 35951, 35963, 35977, 35993, 36007, 36011, 36061, 36067, 36097, 36107, 36131, 36151, 36187, 36209, 36229, 36241, 36263, 36293, 36307, 36313, 36341, 36373, 36383, 36433, 36451, 36467, 36493, 36523, 36527, 36541, 36551, 36559, 36583, 36599, 36629, 36637, 36671, 36677, 36691, 36709, 36739, 36761, 36779, 36787, 36791, 36809, 36821, 36847, 36871, 36899, 36913, 36919, 36929, 36943, 36973, 36997, 37013, 37019, 37039, 37049, 37057, 37087, 37117, 37159, 37171, 37181, 37199, 37217, 37243, 37273, 37307, 37337, 37357, 37361, 37397, 37441, 37483, 37489, 37501, 37507, 37529, 37547, 37561, 37567, 37571, 37589, 37607, 37633, 37643, 37657, 37691, 37781, 37799, 37811, 37831, 37847, 37871, 37889, 37951, 37957, 37963, 37987, 37991, 38039, 38047, 38069, 38113, 38149, 38167, 38177, 38183, 38197, 38219, 38231, 38237, 38261, 38273, 38281, 38299, 38317, 38327, 38371, 38431, 38447, 38459, 38543, 38557, 38567, 38593, 38603, 38609, 38629, 38651, 38669, 38693, 38707, 38711, 38723, 38747, 38767, 38783, 38821, 38833, 38851, 38861, 38867, 38891, 38917, 38921, 38953, 38971, 39019, 39041, 39079, 39089, 39097, 39103, 39113, 39133, 39157, 39161, 39181, 39191, 39209, 39227, 39239, 39293, 39313, 39341, 39359, 39367, 39371, 39397, 39409, 39439, 39499, 39509, 39541, 39563, 39607, 39619, 39659, 39667, 39703, 39719, 39727, 39749, 39761, 39791, 39821, 39827, 39839, 39857, 39863, 39877, 39883, 39929, 39971, 39979, 40009, 40031, 40037, 40063, 40087, 40093, 40111, 40123, 40127, 40151, 40163, 40189, 40213, 40231, 40237, 40277, 40283, 40343, 40351, 40357, 40423, 40427, 40459, 40471, 40483, 40493, 40519, 40529, 40577, 40591, 40627, 40637, 40693, 40697, 40739, 40751, 40759, 40787, 40801, 40813, 40819, 40841, 40847, 40867, 40879, 40897, 40927, 40933, 40961, 40993, 41011, 41017, 41039, 41047, 41077, 41113, 41131, 41141, 41177, 41201, 41213, 41221, 41227, 41231, 41257, 41263, 41333, 41351, 41381, 41387, 41411, 41443, 41467, 41479, 41507, 41513, 41519, 41539, 41579, 41593, 41603, 41609, 41617, 41641, 41647, 41681, 41719, 41729, 41759, 41771, 41801, 41809, 41843, 41849, 41879, 41887, 41893, 41927, 41941, 41947, 41953, 41957, 41981, 41999, 42013, 42017, 42043, 42061, 42071, 42083, 42131, 42157, 42169, 42179, 42187, 42193, 42209, 42221, 42281, 42293, 42323, 42331, 42349, 42373, 42391, 42397, 42403, 42407, 42433, 42451, 42457, 42461, 42487, 42533, 42557, 42569, 42641, 42667, 42677, 42683, 42697, 42701, 42719, 42737, 42767, 42787, 42793, 42821, 42839, 42853, 42859, 42899, 42923, 42937, 42953, 42961, 42979, 43003, 43013, 43037, 43049, 43063, 43093, 43151, 43177, 43189, 43201, 43223, 43261, 43283, 43313, 43319, 43391, 43397, 43427, 43441, 43451, 43481, 43541, 43573, 43577, 43591, 43607, 43627, 43649, 43661, 43691, 43711, 43717, 43753, 43777, 43781, 43787, 43853, 43889, 43913, 43933, 43943, 43961, 43969, 43987, 44017, 44027, 44041, 44053, 44087, 44101, 44111, 44119, 44129, 44159, 44171, 44201, 44249, 44257, 44263, 44267, 44279, 44351, 44371, 44381, 44449, 44483, 44491, 44497, 44519, 44531, 44543, 44579, 44617, 44621, 44633, 44641, 44647, 44683, 44699, 44729, 44741, 44771, 44789, 44809, 44839, 44867, 44879, 44887, 44909, 44953, 44959, 44983, 45007, 45053, 45077, 45119, 45127, 45137, 45161, 45179, 45191, 45233, 45247, 45259, 45281, 45289, 45307, 45317, 45329, 45337, 45341, 45361, 45377, 45403, 45427, 45433, 45481, 45491, 45497, 45523, 45533, 45553, 45587, 45631, 45659, 45667, 45673, 45691, 45737, 45751, 45757, 45763, 45817, 45821, 45853, 45863, 45887, 45943, 45949, 45971, 46021, 46049, 46091, 46099, 46133, 46141, 46147, 46171, 46181, 46219, 46229, 46261, 46271, 46301, 46307, 46327, 46349, 46381, 46399, 46439, 46447, 46471]