Thread: CRT offsets
View Single Post
Old 2021-04-03, 05:35   #9
Mar 2021

53 Posts

Nice work on the CRTs.

If you are looking for a gap of 220k then the first prime can range from -220k to 0 and the second prime can range from 0 to 220k. If you want to maximize your chance of finding a gap of 220k you probably want to run your CRT code for a gap size larger than 220k.

220k is roughly a merit of 28. I have a code that will calculate the probability of finding a gap greater than a given merit for a primorial and offset. I ran it for the 3 CRTs above and /7#, /11#, /13#, /17#.
Merit     CRT_6776    CRT_6751    CRT_6727    7993#/7#    7993#/11#_1 7993#/11#_13 7993#/13#   7993#/17#
20        8.99E-04    9.10E-04    8.77E-04    1.00E-03    1.03E-03    9.97E-04     8.20E-04    6.18E-04
21        5.13E-04    5.19E-04    4.96E-04    5.35E-04    5.73E-04    5.56E-04     4.70E-04    3.56E-04
22        2.89E-04    2.92E-04    2.76E-04    2.80E-04    3.15E-04    3.05E-04     2.65E-04    2.03E-04
23        1.60E-04    1.61E-04    1.52E-04    1.44E-04    1.71E-04    1.65E-04     1.48E-04    1.14E-04
24        8.76E-05    8.80E-05    8.17E-05    7.28E-05    9.13E-05    8.80E-05     8.15E-05    6.35E-05
25        4.73E-05    4.74E-05    4.34E-05    3.63E-05    4.81E-05    4.64E-05     4.44E-05    3.51E-05
26        2.52E-05    2.52E-05    2.27E-05    1.79E-05    2.51E-05    2.41E-05     2.39E-05    1.92E-05
27        1.33E-05    1.32E-05    1.17E-05    8.66E-06    1.29E-05    1.24E-05     1.28E-05    1.04E-05
28        6.92E-06    6.83E-06    5.99E-06    4.15E-06    6.56E-06    6.30E-06     6.73E-06    5.56E-06
29        3.57E-06    3.49E-06    3.01E-06    1.96E-06    3.30E-06    3.17E-06     3.51E-06    2.96E-06
30        1.82E-06    1.76E-06    1.49E-06    9.17E-07    1.64E-06    1.57E-06     1.82E-06    1.56E-06
31        9.16E-07    8.82E-07    7.23E-07    4.25E-07    8.08E-07    7.75E-07     9.34E-07    8.17E-07
32        4.57E-07    4.36E-07    3.48E-07    1.94E-07    3.94E-07    3.78E-07     4.75E-07    4.24E-07
33        2.26E-07    2.13E-07    1.65E-07    8.80E-08    1.90E-07    1.83E-07     2.40E-07    2.19E-07
34        1.11E-07    1.04E-07    7.79E-08    3.95E-08    9.12E-08    8.75E-08     1.20E-07    1.12E-07
35        5.38E-08    4.97E-08    3.63E-08    1.76E-08    4.33E-08    4.15E-08     5.95E-08    5.68E-08
36        2.59E-08    2.37E-08    1.68E-08    7.76E-09    2.04E-08    1.96E-08     2.93E-08    2.87E-08
37        1.24E-08    1.12E-08    7.67E-09    3.40E-09    9.51E-09    9.13E-09     1.43E-08    1.44E-08
38        5.87E-09    5.23E-09    3.48E-09    1.47E-09    4.40E-09    4.22E-09     6.94E-09    7.13E-09
39        2.75E-09    2.43E-09    1.57E-09    6.34E-10    2.01E-09    1.94E-09     3.33E-09    3.51E-09
40        1.27E-09    1.11E-09    6.96E-10    2.69E-10    9.11E-10    8.76E-10     1.58E-09    1.70E-09
CRT_6776 is better than CRT_6751 for merits > 26. CRT_6727 is worse than the other 2 CRTs for all merits (it might be better for some cases below 20).

7993#/7# is best below 20
7993#/11# is best from 20-26
CRT_6776 is best from 26-30
7993#/13# is best from 30-37
7993#/17# is best above 37

The /Q# cases were computed with A mod Q# = 1 but there is some variation among the offset chosen. For /11# I ran for offsets 1 and 13 which were one of the best and worst cases. The offset of 1 gives about a 4% improvement over 13.
CraigLo is offline   Reply With Quote