Skip to content

🤓 A tool to find Julson Primes (additive primes)

License

Notifications You must be signed in to change notification settings

CJKinni/julson-primes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Julson-Primes

🤓 A tool to find Julson Primes (additive primes)

My coworker and I were discussing prime numbers, and he was thinking about prime numbers where the sum of their digits is also a prime number. It turns out these are called additive primes, but that's boring. So I'm calling them Julson primes. I wrote a script to see how many there were, compared to regular primes.

The number it will search up to as an argument.

The script lists out all primes, but it will include " Julson" next to the prime if it is a Julson Prime.

The file 'first_million.txt', included in this repository, contains the output for ruby find_julson_primes.rb 1000000

Here is a list of the first thousand Julson Primes:

2, 3, 5, 7, 11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 113, 131, 137, 139, 151, 157, 173, 179, 191, 193, 197, 199, 223, 227, 229, 241, 263, 269, 281, 283, 311, 313, 317, 331, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 461, 463, 467, 487, 557, 571, 577, 593, 599, 601, 607, 641, 643, 647, 661, 683, 719, 733, 739, 751, 757, 773, 797, 809, 821, 823, 827, 829, 863, 881, 883, 887, 911, 919, 937, 953, 971, 977, 991, 1013, 1019, 1031, 1033, 1039, 1051, 1091, 1093, 1097, 1103, 1109, 1123, 1129, 1163, 1181, 1187, 1213, 1217, 1231, 1237, 1259, 1277, 1279, 1291, 1297, 1301, 1303, 1307, 1321, 1327, 1361, 1367, 1381, 1433, 1439, 1451, 1453, 1459, 1471, 1493, 1499, 1523, 1543, 1549, 1567, 1583, 1613, 1619, 1637, 1657, 1693, 1697, 1709, 1721, 1723, 1741, 1747, 1783, 1787, 1811, 1831, 1871, 1873, 1877, 1901, 1907, 1949, 2003, 2027, 2029, 2063, 2069, 2081, 2083, 2087, 2089, 2111, 2113, 2131, 2137, 2153, 2179, 2203, 2207, 2221, 2243, 2267, 2269, 2281, 2287, 2311, 2333, 2339, 2351, 2357, 2371, 2377, 2393, 2399, 2423, 2441, 2447, 2467, 2531, 2539, 2551, 2557, 2579, 2591, 2593, 2609, 2621, 2647, 2663, 2683, 2687, 2711, 2713, 2719, 2731, 2753, 2777, 2791, 2801, 2803, 2843, 2861, 2917, 2939, 2953, 2957, 2971, 2999, 3011, 3019, 3037, 3079, 3109, 3121, 3163, 3167, 3169, 3181, 3187, 3217, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3323, 3329, 3343, 3347, 3361, 3389, 3413, 3433, 3457, 3491, 3527, 3529, 3541, 3547, 3581, 3583, 3613, 3617, 3631, 3637, 3659, 3671, 3673, 3677, 3691, 3701, 3709, 3727, 3761, 3767, 3833, 3851, 3853, 3907, 3923, 3929, 3943, 3947, 3989, 4001, 4003, 4007, 4021, 4027, 4049, 4111, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4229, 4241, 4243, 4261, 4283, 4289, 4337, 4339, 4357, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4463, 4481, 4483, 4513, 4517, 4519, 4591, 4603, 4621, 4643, 4649, 4663, 4733, 4751, 4793, 4799, 4801, 4861, 4889, 4919, 4931, 4933, 4937, 4951, 4973, 4999, 5011, 5039, 5051, 5059, 5077, 5099, 5101, 5107, 5147, 5167, 5189, 5231, 5233, 5237, 5273, 5279, 5297, 5303, 5309, 5323, 5347, 5381, 5387, 5413, 5417, 5419, 5431, 5437, 5471, 5477, 5501, 5503, 5507, 5521, 5527, 5563, 5581, 5639, 5651, 5653, 5657, 5693, 5701, 5741, 5743, 5783, 5813, 5851, 5879, 5897, 5903, 5923, 5927, 5981, 5987, 6007, 6029, 6043, 6047, 6067, 6089, 6113, 6131, 6133, 6151, 6173, 6197, 6203, 6221, 6229, 6247, 6263, 6269, 6287, 6311, 6317, 6337, 6353, 6359, 6373, 6421, 6427, 6449, 6481, 6551, 6553, 6571, 6599, 6607, 6661, 6689, 6719, 6733, 6737, 6779, 6791, 6803, 6823, 6827, 6841, 6863, 6869, 6911, 6917, 6959, 6971, 6977, 6997, 7013, 7019, 7039, 7057, 7079, 7103, 7109, 7121, 7127, 7129, 7187, 7211, 7213, 7219, 7237, 7253, 7307, 7309, 7321, 7349, 7411, 7417, 7433, 7451, 7457, 7499, 7507, 7523, 7529, 7541, 7547, 7561, 7583, 7589, 7673, 7691, 7699, 7703, 7723, 7727, 7741, 7789, 7817, 7853, 7877, 7879, 7901, 7907, 7949, 8009, 8069, 8081, 8087, 8111, 8117, 8171, 8191, 8209, 8221, 8243, 8263, 8311, 8317, 8353, 8423, 8429, 8443, 8447, 8461, 8513, 8537, 8573, 8597, 8599, 8609, 8623, 8627, 8641, 8663, 8669, 8681, 8689, 8713, 8731, 8753, 8779, 8803, 8807, 8821, 8849, 8861, 8867, 8887, 8933, 8951, 9011, 9013, 9059, 9091, 9103, 9109, 9127, 9161, 9181, 9239, 9257, 9293, 9323, 9341, 9343, 9413, 9419, 9431, 9433, 9437, 9473, 9479, 9491, 9497, 9521, 9587, 9613, 9631, 9677, 9679, 9697, 9721, 9743, 9749, 9767, 9769, 9787, 9811, 9833, 9839, 9851, 9857, 9859, 9901, 9923, 9929, 9941, 9949, 9967, 10037, 10039, 10079, 10091, 10093, 10099, 10103, 10141, 10163, 10169, 10181, 10211, 10253, 10259, 10271, 10273, 10301, 10303, 10321, 10343, 10369, 10433, 10453, 10457, 10459, 10477, 10499, 10501, 10529, 10567, 10589, 10613, 10631, 10639, 10651, 10657, 10691, 10709, 10723, 10729, 10781, 10831, 10837, 10853, 10859, 10891, 10903, 10909, 10949, 11003, 11027, 11047, 11069, 11083, 11087, 11113, 11117, 11119, 11131, 11159, 11171, 11173, 11177, 11197, 11243, 11261, 11287, 11311, 11317, 11351, 11353, 11393, 11399, 11423, 11443, 11447, 11467, 11483, 11489, 11519, 11551, 11579, 11593, 11597, 11621, 11681, 11717, 11719, 11731, 11777, 11801, 11807, 11821, 11827, 11863, 11867, 11933, 11939, 11953, 11971, 12011, 12037, 12071, 12073, 12097, 12101, 12107, 12109, 12143, 12149, 12161, 12163, 12211, 12239, 12251, 12253, 12277, 12301, 12323, 12329, 12343, 12347, 12413, 12433, 12437, 12451, 12457, 12473, 12479, 12491, 12497, 12503, 12527, 12541, 12547, 12569, 12583, 12611, 12613, 12619, 12637, 12653, 12659, 12671, 12703, 12721, 12743, 12763, 12781, 12853, 12893, 12899, 12907, 12923, 12941, 12983, 13001, 13003, 13007, 13009, 13043, 13049, 13063, 13151, 13159, 13171, 13177, 13229, 13241, 13249, 13267, 13313, 13331, 13337, 13339, 13397, 13421, 13441, 13463, 13469, 13487, 13513, 13537, 13553, 13577, 13591, 13627, 13649, 13681, 13711, 13751, 13757, 13799, 13807, 13829, 13841, 13883, 13913, 13931, 13933, 13997, 13999, 14011, 14033, 14051, 14057, 14071, 14107, 14143, 14149, 14251, 14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14411, 14419, 14431, 14437, 14503, 14543, 14549, 14561, 14563, 14633, 14639, 14653, 14657, 14699, 14723, 14741, 14747, 14783, 14813, 14831, 14851, 14879, 14891, 14897, 14923, 14969, 15061, 15083, 15131, 15137, 15139, 15173, 15193, 15227, 15241, 15263, 15269, 15287, 15313, 15319, 15331, 15359, 15373, 15377, 15391, 15401, 15427, 15443, 15461, 15467, 15511, 15551, 15601, 15607, 15629, 15641, 15643, 15647, 15661, 15683, 15731, 15733, 15737, 15773, 15791, 15797, 15803, 15809, 15823, 15881, 15887, 15889, 15913, 15959, 15971, 16033, 16057, 16073, 16091, 16097, 16103, 16127, 16141, 16183, 16187, 16217, 16231, 16253, 16273, 16301, 16349, 16361, 16363, 16381, 16411, 16417, 16433, 16451, 16453, 16493, 16529, 16547, 16561, 16619, 16631, 16633, 16651, 16673, 16691, 16699, 16703, 16741, 16763, 16787, 16811, 16831, 16871, 16879, 16901, 16903, 16921, 16943, 16987, 17021, 17027, 17029, 17041, 17047, 17117, 17137, 17159, 17191, 17203, 17207, 17209, 17317, 17333, 17351, 17393, 17401, 17443, 17483, 17489, 17519, 17551, 17573, 17579, 17597, 17599, 17609, 17623, 17627, 17669, 17681, 17713, 17807, 17911, 17939, 17957, 17959, 17977, 18013, 18059, 18077, 18121, 18127, 18143, 18149, 18181, 18211, 18217, 18233, 18251, 18253, 18257, 18301, 18307, 18329, 18341, 18413, 18433, 18451, 18503, 18521, 18523, 18541, 18587, 18617, 18671, 18679