Skip to content
Branch: master
Find file History
Latest commit a23376c May 23, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md Merged even and odd counts May 7, 2019
a077390.txt
approx.py Limited LEFT_BASES to base with < ~1e9 primes May 7, 2019
bi-truncatable-primes.cpp Tweaks to interesting.txt May 6, 2019
bi-truncatable-primes.py fixed bad variable use May 7, 2019
counts_both_python.txt Merged even and odd counts May 7, 2019
counts_even_python.txt Added counts and examples. May 6, 2019
counts_odd_python.txt Added counts and examples. May 6, 2019
interesting.txt A037274 setup May 23, 2019

README.md

A077390

Run the c++ code with

g++ bi-truncatable-primes.cpp -O2 -fopenmp -lpthread -lgmpxx -lgmp
time ./a.out

This takes ~1000 cpu-core-minutes on my computer (and only produces odd length counts)


Run the Python code with

python3 bi-truncatable-primes.py

This takes ~2200 cpu-core-minutes and ~20 Gigs of memory / disk

Results

This was run as a puzzle on PrimePuzzles

length running total c++ Python
1 4 4 4
2 25 21 21
3 84 59 59
4 302 218 218
5 796 494 494
6 2325 1529 1529
7 5158 2833 2833
8 12975 7817 7817
9 25693 12718 12718
10 58044 32351 32351
11 104851 46807 46807
12 212668 107817 107817
13 354568 141900 141900
14 664397 309829 309829
15 1041739 377342 377342
16 1830517 788778 788778
17 2708433 877916 877916
18 4455588 1747155 1747155
19 6239453 1783865 1783865
20 9731754 3492301 3492301
21 13064499 3332745 3332745
22 19467873 6403374 6403374
23 25161035 5693162 5693162
24 35815877 10654842 10654842
25 44655900 8840023 8840023
26 60969263 16313363 16313363
27 73796822 12827559 12827559
28 97303612 23506790 23506790
29 114588329 17284717 17284717
30 145758260 31169931 31169931
31 167418460 21660200 21660200
32 206093054 38674594 38674594
33 231740658 25647604 25647604
34 277822730 46082072 46082072
35 306377535 28554805 28554805
36 357153989 50776454 50776454
37 386827833 29673844 29673844
38 439560137 52732304 52732304
39 469220891 29660754 29660754
40 522235982 53015091 53015091
41 550766960 28530978 28530978
42 600403454 49636494 49636494
43 626091081 25687627 25687627
44 670562646 44471565 44471565
45 692848094 22285448 22285448
46 731988873 39140779 39140779
47 750636172 18647299 18647299
48 782633362 31997190 31997190
49 797244279 14610917 14610917
50 822408498 25164219 25164219
51 833556470 11147972 11147972
52 853081760 19525290 19525290
53 861290422 8208662 8208662
54 875551825 14261403 14261403
55 881249550 5697725 5697725
56 891333679 10084129 10084129
57 895245627 3911948 3911948
58 902238421 6992794 6992794
59 904847551 2609130 2609130
60 909420355 4572804 4572804
61 911059736 1639381 1639381
62 913986021 2926285 2926285
63 915001845 1015824 1015824
64 916844734 1842889 1842889
65 917448893 604159 604159
66 918543785 1094892 1094892
67 918889495 345710 345710
68 919523348 633853 633853
69 919719565 196217 196217
70 920083619 364054 364054
71 920191295 107676 107676
72 920389888 198593 198593
73 920446546 56658 56658
74 920551985 105439 105439
75 920581814 29829 29829
76 920637665 55851 55851
77 920652764 15099 15099
78 920680932 28168 28168
79 920688061 7129 7129
80 920701759 13698 13698
81 920705163 3404 3404
82 920711791 6628 6628
83 920713294 1503 1503
84 920716443 3149 3149
85 920717131 688 688
86 920718554 1423 1423
87 920718866 312 312
88 920719512 646 646
89 920719644 132 132
90 920719964 320 320
91 920720010 46 46
92 920720148 138 138
93 920720172 24 24
94 920720242 70 70
95 920720255 13 13
96 920720279 24 24
97 920720282 3 3
98 920720297 15 15
100 920720307 10 10
102 920720313 6 6
104 920720315 2 2

Extra

cat counts_odd_python.txt  | sed -n 's#\([0-9]*\) \([0-9]*\) \([0-9]*\) \[\([0-9]*\),.* \(.*\)\]$#The number of bi-truncatable Primes of Length \1 is \3 making a running total of \2 smallest is \4 largest is \5#p'
cat counts_even_python.txt | sed -n 's#\([0-9]*\) \([0-9]*\) \([0-9]*\) \[\([0-9]*\),.* \(.*\)\]$#The number of bi-truncatable Primes of Length \1 is \3 making a running total of \2 smallest is \4 largest is \5#p'
cat counts_both_python.txt | sed -n 's#\([0-9]*\) \([0-9]*\) \([0-9]*\) \[\([0-9]*\),.* \(.*\)\]$#The number of bi-truncatable Primes of Length \1 is \3 making a running total of \2 smallest is \4 largest is \5#p'
You can’t perform that action at this time.