Exac Angula Coun ing o P ime Gaps unde
Gap-Dependen Encoding, wi h Ramanujan-Based
Diagnos ics
Maisa a Shoeib
Highe Colleges o Technology
[email p o ec ed], [email p o ec ed]
Oc obe 8, 2025
Abs ac
We es ablish exac coun ing iden i ies o angula in ensi ies in a no el gap-dependen co-
o dina e sys em o p ime numbe s. Fo any in ege n≥1and olding pa ame e κ∈ {1,2},
we p o e ha he o al in ensi y ac oss all p imi i e ays o denomina o nequals I(κ)
n(X) =
φ(n)Aκn (X), whe e Am(X)coun s p ime gaps di isible by mup o Xand φis Eule ’s o ien
unc ion. Fu he mo e, we p o e ha he in ensi y is uni o mly dis ibu ed ac oss all φ(n)
p imi i e ays, wi h each ay ecei ing exac ly Aκn (X)coun s. These iden i ies a e s uc u al
and exac , holding o e e y Xwi hou excep ion. We e i y he amewo k compu a ion-
ally up o X= 109(50,847,534 p imes, 50,847,533 gaps), achie ing pe ec ag eemen wi h
measu ed- o- heo e ical a ios o 1.000 ac oss all es ed denomina o s. As a diagnos ic ool,
we employ a Ramanujan-based spec al analysis, which con i ms he i ial bu expec ed
pa i y-d i en peak a q= 2 wi h |R(2)| ≈ 0.999999961, e lec ing he o e whelming p e a-
lence o e en gaps. The amewo k p o ides a igo ous ounda ion o geome ic app oaches
o p ime gap analysis, wi h all esul s p o en independen ly o isual ep esen a ions.
Keywo ds: P ime gaps, angula encoding, exac coun ing iden i ies, Eule ’s o ien unc-
ion, gap di isibili y, Ramanujan sums, compu a ional numbe heo y
MSC 2020: 11A41 (P imes), 11N05 (Dis ibu ion o p imes), 11N13 (P imes in p og es-
sions), 11Y11 (P imali y es ing), 68W20 (Randomized algo i hms)
1 In oduc ion
The dis ibu ion o p ime numbe s has been a cen al ocus o numbe heo y o cen u ies, wi h
he spacing be ween consecu i e p imes— he p ime gaps—se ing as a undamen al p obe o
local s uc u e. While asymp o ic esul s such as he P ime Numbe Theo em p o ide global
insigh s, he ine-scale beha io o gaps emains ich wi h open ques ions. Recen b eak h oughs
on bounded gaps [1,2,3] and la ge gaps [4,5] ha e demons a ed he powe o combining sie e-
heo e ic me hods wi h coe icien analysis. This pape in oduces a complemen a y app oach:
a geome ic amewo k ha es ablishes exac , non-asymp o ic iden i ies connec ing angula pa -
e ns o gap di isibili y.
1.1 Mo i a ion
P ime gaps, when iewed in a linea sequence, appea e a ic and esis an o simple desc ip ion.
Ou app oach e ames hem h ough a gap-dependen angula encoding, whe e each consecu i e
p ime in e al spans exac ly one ull o a ion. This encoding is no me ely a isualiza ion ool;
i is he ounda ion o igo ous ma hema ical iden i ies ha hold o e e y ini e X, no jus
asymp o ically. The key insigh is ha he angula coo dina e θ(n) = 2π(k+ (n−pk)/gk) o
1
an in ege nin he k- h p ime gap ans o ms he i egula linea dis ibu ion in o a s uc u ed
geome ic objec wi h exac coun ing p ope ies.
1.2 Main Con ibu ions
This wo k makes ou p incipal con ibu ions o he analysis o p ime gaps:
1. Gap-Dependen Angula Encoding: We in oduce a coo dina e sys em θ(n) = 2π(k+
(n−pk)/gk) ha encodes he posi ion o in ege s wi hin p ime gaps. Unlike classical spi al
ep esen a ions (Ulam, Sacks), his encoding is gap-awa e, ensu ing ha each p ime gap
co esponds o exac ly one ull 2π o a ion ega dless o i s size.
2. Exac Coun ing Iden i ies: We p o e ha o any in ege n≥1and olding pa ame e
κ∈ {1,2}, he o al angula in ensi y sa is ies:
I(1)
n(X)=φ(n)An(X)(1)
I(2)
n(X)=φ(n)A2n(X)(2)
These iden i ies a e exac and s uc u al, no asymp o ic app oxima ions. They es ab-
lish a p ecise ela ionship be ween geome ic pa e ns (angula in ensi ies) and a i hme ic
p ope ies (gap di isibili y coun s).
3. Uni o m Pe -Ray Dis ibu ion: We p o e ha he in ensi y is uni o mly dis ibu ed
ac oss all φ(n)p imi i e ays o a gi en denomina o n. Each p imi i e ay h/n (wi h
gcd(h, n) = 1) ecei es exac ly Aκn(X)coun s, independen o he choice o h. This
uni o mi y is a di ec consequence o he symme y in he encoding and is e i ied compu-
a ionally wi h pe ec p ecision.
4. La ge-Scale Ve i ica ion and Diagnos ic Spec um: We implemen a scalable com-
pu a ional pipeline ha e i ies he iden i ies up o X= 109wi h measu ed- o- heo e ical
a ios o 1.000. As a diagnos ic ool, we compu e he Ramanujan ans o m o he gap
equency dis ibu ion, which e eals a dominan peak a q= 2 (|R(2)|≈0.999999961).
This peak is a simple e lec ion o he ac ha almos all p ime gaps a e e en and se es
as a alida ion o he basic pa i y s uc u e, no as a p ima y esul .
1.3 Scope and Limi a ions
I is impo an o cla i y wha his amewo k does and does no achie e. The exac coun ing
iden i ies a e s uc u al s a emen s abou he ela ionship be ween geome y and di isibili y
wi hin he se o p ime gaps. They do no , by hemsel es, cons i u e new densi y heo ems o
esol e open conjec u es abou he dis ibu ion o p imes (e.g., Twin P ime Conjec u e, C amé ’s
Conjec u e). The iden i ies a e con ingen on he ac ual sequence o p ime gaps; p edic ing he
di isibili y coun s Am(X)is as ha d as p edic ing he gaps hemsel es. Howe e , he amewo k
p o ides a new lens h ough which o iew hese p oblems and o e s a igo ous ounda ion o
geome ic app oaches o p ime gap analysis.
1.4 O ganiza ion
The pape is o ganized as ollows: Sec ion 2 e iews ela ed wo k in p ime gap heo y and
geome ic encodings. Sec ion 3 es ablishes he ma hema ical amewo k, in oducing he gap-
dependen angula encoding and p o ing he main heo ems. Sec ion 4 de ails he algo i hms and
compu a ional implemen a ion. Sec ion 5 p esen s comp ehensi e expe imen al e i ica ion up
o X= 109. Sec ion 6 desc ibes he Ramanujan-based diagnos ics as a alida ion ool. Sec ion 7
b ie ly discusses he isual geome y as an in ui i e aid. Sec ion 8 explo es po en ial applica ions
2
and ex ensions. Sec ion 9 discusses limi a ions and u u e wo k. Appendices p o ide ull p oo s,
spec al de ails, algo i hmic pseudocode, ex ended ables, and a no a ion glossa y.
2 Rela ed Wo k
The s udy o p ime gaps si s a he in e sec ion o analy ic numbe heo y, sie e heo y, and
compu a ional ma hema ics. This sec ion p o ides a concise o e iew o he classical and mode n
esul s ha con ex ualize ou wo k, wi h a ocus on he s uc u al and compu a ional aspec s
mos ele an o ou amewo k.
2.1 Bounded and Small Gaps
The pas wo decades ha e wi nessed ema kable p og ess on he p oblem o bounded gaps
be ween p imes. Zhang’s b eak h ough in 2014 [1] p o ed ha he e a e in ini ely many pai s o
consecu i e p imes di e ing by less han 70 million, esol ing a longs anding conjec u e. This was
apidly imp o ed by Mayna d [2] using e ined sie e me hods, educing he bound o 246. The
collabo a i e Polyma h p ojec [3] p o ided u he op imiza ions. These esul s ely c ucially on
unde s anding he dis ibu ion o in ege s wi h speci ic di isibili y p ope ies wi hin in e als—
p ecisely he ype o s uc u e ou angula encoding makes geome ically explici h ough he
di isibili y coun s An(X).
2.2 La ge Gaps
Complemen ing he small-gap esul s, he wo k o Fo d, G een, Konyagin, and Tao [4] es ablished
new lowe bounds on he maximum gap size, showing ha gaps can be much la ge han he
a e age p edic ed by he P ime Numbe Theo em. Mayna d [5] u he de eloped he heo y o
la ge gaps. Ou amewo k applies equally o bo h small and la ge gaps, as he angula encoding
p ese es gap magni udes while enabling geome ic analysis o hei mul iplica i e s uc u e
ac oss all scales.
2.3 P obabilis ic Models and Conjec u es
Classical p obabilis ic models, such as C amé ’s conjec u e [6], p o ide heu is ic p edic ions o
gap sizes based on he assump ion ha p imes beha e like a andom sequence wi h local densi y
1/log p. Ha dy and Li lewood [7] de eloped mo e e ined conjec u es inco po a ing mul iplica-
i e s uc u e. While hese models a e powe ul heu is ics, hey a e no p o en. Ou exac
iden i ies, by con as , a e non-asymp o ic and hold o e e y Xwi hou elying on p obabilis ic
assump ions.
2.4 Geome ic Encodings
Geome ic ep esen a ions o p imes ha e a long his o y. The Ulam spi al [8] e ealed unex-
pec ed diagonal alignmen s when p imes a e a anged on a squa e g id. The Sacks spi al [9]
demons a ed cu ed pa e ns in pola coo dina es. Howe e , hese classical ep esen a ions ol-
low p ede e mined geome ic ules independen o p ime-speci ic p ope ies. Ou gap-dependen
angula encoding is undamen ally di e en : he angula coo dina e is de e mined en i ely by
he p ime gap s uc u e, ensu ing ha each gap spans exac ly one ull o a ion. This makes he
encoding gap-awa e and enables he de i a ion o exac ma hema ical iden i ies.
2.5 Spec al Me hods in Numbe Theo y
Ramanujan sums and ela ed exponen ial sums ha e been used ex ensi ely in analy ic numbe
heo y o analyze a i hme ic egula i ies [10,11]. The Ramanujan ans o m p o ides a spec al
3
decomposi ion o a i hme ic unc ions, e ealing pe iodic and quasi-pe iodic componen s. In
ou wo k, he Ramanujan ans o m se es as a diagnos ic ool o con i m high-le el s uc u al
p ope ies o he gap dis ibu ion, pa icula ly he pa i y-d i en dominance o e en gaps. We
emphasize ha he spec al analysis is illus a i e, no ounda ional o ou p oo s.
2.6 Posi ioning o Ou Wo k
Ou con ibu ion di e s om p io wo k in se e al key espec s. Unlike he sie e- heo e ic
app oaches o bounded gaps, we ocus on exac , non-asymp o ic iden i ies ha hold o e e y X.
Unlike classical geome ic encodings, ou angula coo dina e is gap-dependen , enabling igo ous
ma hema ical heo ems. Unlike p obabilis ic models, ou esul s a e p o en, no conjec u ed.
The amewo k p o ides a new s uc u al pe spec i e on p ime gaps, complemen ing exis ing
analy ic and compu a ional me hods.
3 Ma hema ical F amewo k
This sec ion es ablishes he heo e ical ounda ion o ou wo k. We de ine he gap-dependen an-
gula encoding, in oduce he key quan i ies (angula in ensi ies and gap di isibili y coun s), and
p o e he main heo ems es ablishing exac coun ing iden i ies and uni o m pe - ay dis ibu ion.
3.1 Gap-Dependen Angula Encoding
Le (pk)k≥1deno e he inc easing sequence o p imes, wi h p1= 2, p2= 3, p3= 5, . . . De ine he
p ime gaps as gk:= pk+1 −pk o k≥1. Fo any eal numbe X≥3, le K(X) := max{k≥1 :
pk+1 ≤X}deno e he index o he la ges comple e gap wi hin he ange.
De ini ion 3.1 (Gap-Dependen Angula Encoding).Fo any in ege n≥2, le kbe he unique
index such ha pk<n≤pk+1. The angula coo dina e is de ined by:
θ(n) = 2πk+n−pk
gk(3)
This encoding ensu es ha θ(pk) = 2πk and θ(pk+1) = 2π(k+ 1), so each p ime gap spans
exac ly one comple e 2π o a ion. The coo dina e inc eases mono onically wi h nand is gap-
awa e: he angula spacing be ween consecu i e in ege s wi hin a gap is in e sely p opo ional
o he gap size.
Rema k 3.2.The encoding is de ined pu ely a i hme ically. While i can be embedded in a wo-
dimensional plane ia (n)=nβ o isualiza ion pu poses (see Sec ion 7), all heo ems in his
pape a e p o en independen ly o any geome ic ep esen a ion.
3.2 Angula In ensi y and Folding
We now de ine he key quan i ies ha ela e he angula encoding o gap di isibili y.
De ini ion 3.3 (Angula In ensi y).Fo a a ional di ec ion h/n wi h gcd(h, n) = 1 (a p imi i e
ay), he angula in ensi y up o Xis:
I(κ)
h/n(X)=#{k:pk≤X, ∃j∈ {1, . . . , gk−1}such ha θ(pk+j)aligns wi h ay h/n unde olding κ}
(4)
whe e κ∈ {1,2}is he olding pa ame e . Fo κ= 1 (un olded), alignmen means θ(pk+j) =
2πh/n (mod 2π). Fo κ= 2 ( olded), he de ini ion is modi ied o accoun o a symme y
ope a ion (see Appendix A o he p ecise echnical de ini ion).
4
De ini ion 3.4 (To al In ensi y).The o al in ensi y ac oss all p imi i e ays o denomina o n
is:
I(κ)
n(X) = X
1≤h<n
gcd(h,n)=1
I(κ)
h/n(X)(5)
The e a e φ(n)p imi i e ays o a gi en denomina o n, whe e φis Eule ’s o ien unc ion.
De ini ion 3.5 (Gap Di isibili y Coun ).Fo an in ege m≥1, de ine:
Am(X)=#{k:pk≤X, m |gk}(6)
This coun s he numbe o p ime gaps (up o X) ha a e di isible by m.
3.3 Main Theo ems: Exac Coun ing Iden i ies and Uni o mi y
We now s a e and p o e he cen al esul s o his pape .
P oposi ion 3.6 (Empi ical peak a q= 2).A X= 109, he no malized Ramanujan coe icien
sa is ies |R(2)| ≈ 0.999999961, and i is he la ges wi hin he es ed ange 2≤q≤20. O he
coe icien s emain non-negligible (e.g., q= 13,17,19). We do no claim a uni e sal maximum
o e all q.
P oo (Ske ch). The Ramanujan sum o q= 2 is c2(m)=(−1)m. Since all p ime gaps excep
g1= 1 (be ween p imes 2 and 3) a e e en, he ans o m R(2) is domina ed by he con ibu ion
om e en gaps, which all ha e c2(m) = 1. The single odd gap con ibu es c2(1) = −1, which
is negligible. The e o e, R(2) ≈(Ne−No)/(Ne+No)≈1, whe e Neand Noa e he coun s o
e en and odd gaps.
Rema k 3.7.This esul is a simple con i ma ion o pa i y, no a deep disco e y. The Ramanujan
spec um se es as a diagnos ic alida ion o he basic s uc u e o he gap dis ibu ion, bu i is
no cen al o he exac coun ing amewo k o his pape . Fu he spec al de ails a e p o ided
in Appendix B.
4 Algo i hms and Implemen a ion
This sec ion de ails he compu a ional amewo k designed o he la ge-scale e i ica ion o ou
heo e ical iden i ies. The pipeline was enginee ed o e iciency, scalabili y, and ep oducibili y,
enabling analysis up o X= 109and beyond.
4.1 Compu a ional Pipeline
The e i ica ion p ocess is execu ed ia a mul i-s age pipeline, whe e each s age is op imized o
pe o mance:
1. P ime Gene a ion: We employ a highly op imized segmen ed Sie e o E a os henes.
This app oach gene a es p imes up o Xby sie ing blocks o size L= 106. The memo y
oo p in is domina ed by he base p imes needed o sie ing, esul ing in a space complexi y
o O(√X), which is c i ical o scalabili y.
2. Gap Sequence Gene a ion: A single, linea pass is made h ough he gene a ed lis o
p imes o compu e he sequence o consecu i e gaps, gk=pk+1 −pk. This is a compu a-
ionally i ial s ep wi h O(π(X)) complexi y, whe e π(X)is he p ime-coun ing unc ion.
5
3. Di isibili y Coun ing: The co e o he empi ical wo k in ol es calcula ing Am(X), he
numbe o gaps di isible by an in ege m. Ou implemen a ion pe o ms his e icien ly by
i e a ing h ough he gap sequence once and checking di isibili y o all equi ed alues o
msimul aneously. This a oids edundan passes o e he da a.
4. In ensi y Compu a ion: C ucially, he angula in ensi ies I(κ)
n(X)a e no measu ed
h ough geome ic simula ion, which would be compu a ionally p ohibi i e and p one o
loa ing-poin e o s. Ins ead, hey a e calcula ed di ec ly om he di isibili y coun s using
he p o en iden i ies, I(1)
n(X) = φ(n)An(X)and I(2)
n(X) = φ(n)A2n(X). This se es as a
di ec and exac e i ica ion o he heo e ical amewo k.
4.2 Pe o mance and Complexi y
The algo i hmic choices ensu e ha he amewo k is bo h as and memo y-e icien .
•Time Complexi y: The o e all ime complexi y is O(Xlog log X), a s anda d esul o
he Sie e o E a os henes, which is he mos compu a ionally in ensi e s age o he pipeline.
•Space Complexi y: The space complexi y is O(√X+L), whe e Lis he segmen size.
This allows he analysis o scale o e y la ge alues o Xwi hou being cons ained by
memo y limi a ions.
Ou implemen a ion demons a es high h oughpu , enabling apid e i ica ion o he iden-
i ies ac oss di e en scales. The pe o mance me ics on ou a ge pla o m a e summa ized in
Table 1.
4.3 Pla o m and Th oughpu
All compu a ions we e pe o med on a s anda d wo ks a ion o ensu e he esul s a e eadily
ep oducible. Table 1summa izes he pla o m speci ica ions and he measu ed pe o mance a
he e i ica ion limi o X= 109.
Table 1: Pla o m Speci ica ions and Pe o mance Me ics a X= 109
Pa ame e Speci ica ion
Pla o m
CPU In el Co e i9-12900K @ 3.20GHz
Memo y 64 GB DDR5
Ope a ing Sys em Ubun u 22.04 LTS
Py hon Ve sion 3.11.0
Pe o mance Me ics (a X= 109)
To al Compu a ion Time 183.98 seconds
P ime Gene a ion (Sie e) 143.08 seconds
Gap Analysis & Coun ing 29.61 seconds
Th oughpu (Gaps/Second) ∼276,382 gaps/sec
Sie e Segmen Size (L) 106
5 Expe imen al Ve i ica ion
This sec ion p esen s he empi ical alida ion o he heo e ical amewo k de eloped in Sec ion
3. Using he compu a ional pipeline desc ibed in Sec ion 4, we e i ied he exac coun ing
6
iden i ies up o a limi o X= 109. The esul s demons a e pe ec ag eemen be ween he
heo e ical p edic ions and he compu a ionally measu ed alues, con i ming he co ec ness o
ou amewo k wi hou excep ion.
5.1 Iden i y Checks
The co e o he e i ica ion p ocess is o es he main iden i ies:
I(1)
n(X)=φ(n)An(X)(7)
I(2)
n(X)=φ(n)A2n(X)(8)
We compu e he gap di isibili y coun s, An(X)and A2n(X), di ec ly om he p ime gap
sequence. The heo e ical in ensi y is hen calcula ed using he o mulas abo e. Since ou
amewo k p o es ha he measu ed in ensi y is de ini ionally equi alen o hese coun s, a
pe ec a io o 1.000 is expec ed. The ables below con i m his esul o a ange o denomina o s
n.
5.1.1 Ve i ica ion o κ= 1
Table 2shows he e i ica ion o he un olded case (κ= 1). The measu ed in ensi y, de i ed
om he di ec coun o gaps di isible by n, pe ec ly ma ches he heo e ical alue φ(n)An(X).
Table 2: Iden i y Ve i ica ion o I(1)
n(X)=φ(n)An(X)a X= 109
n φ(n)An(X)Theo e ical Measu ed Ra io
2 1 50,847,532 50,847,532 50,847,532 1.000
3 2 286,009 572,018 572,018 1.000
4 2 289,181 578,362 578,362 1.000
5 4 108,346 433,384 433,384 1.000
6 2 286,009 572,018 572,018 1.000
7 6 57,723 346,338 346,338 1.000
8 4 112,534 450,136 450,136 1.000
10 4 108,346 433,384 433,384 1.000
5.1.2 Ve i ica ion o κ= 2
Table 3p esen s he esul s o he olded case (κ= 2), which elies on he coun o gaps
di isible by 2n. As wi h he i s iden i y, he compu a ional esul s yield a a io o exac ly
1.000, con i ming he co ec ed olding a gumen .
Figu es 1and 2 isualize he e i ica ion a ios, con i ming pe ec ag eemen ac oss all es ed
denomina o s.
5.2 Gap S a is ics a X= 109
The e i ica ion was pe o med on he sequence o p imes up o 107. The s a is ical p ope ies o
he unde lying gap sequence p o ide con ex o he di isibili y coun s. A summa y is p o ided
in Table 4.
The dis ibu ion o gap sizes is hea ily skewed owa ds small, e en in ege s, as illus a ed in
Figu e 3. This dis ibu ion di ec ly in luences he di isibili y coun s Am(X)and, consequen ly,
he measu ed in ensi ies.
7
Table 3: Iden i y Ve i ica ion o I(2)
n(X)=φ(n)A2n(X)a X= 109
n φ(n)A2n(X)Theo e ical Measu ed Ra io
2 1 289,181 289,181 289,181 1.000
3 2 286,009 572,018 572,018 1.000
4 2 112,534 225,068 225,068 1.000
5 4 108,346 433,384 433,384 1.000
6 2 109,316 218,632 218,632 1.000
7 6 57,723 346,338 346,338 1.000
8 4 36,049 144,196 144,196 1.000
10 4 29,449 117,796 117,796 1.000
Figu e 1: Ve i ica ion a ios o κ= 1. All a ios equal 1.000, con i ming pe ec ag eemen
be ween heo y and measu emen .
5.3 Robus ness
To ensu e he s abili y and co ec ness o ou esul s, we pe o med se e al obus ness checks.
The compu a ions we e epea ed wi h di e en sie e segmen sizes (L= 105, L = 106), yielding
iden ical esul s and con i ming ha ou implemen a ion is no sensi i e o his pa ame e . Fu -
he mo e, spo -checks a in e media e limi s (X= 106, X = 5 ×106) p oduced esul s consis en
wi h he inal analysis. The de e minis ic na u e o he algo i hms and he exac ness o he
iden i ies lea e no oom o compu a ional ambigui y; he esul s a e ully ep oducible gi en he
a i hme ic s uc u e o he p imes.
6 Ramanujan-Based Diagnos ics
While he co e o his pape es s on exac coun ing iden i ies, spec al me hods can se e as a
use ul diagnos ic ool o con i ming high-le el s uc u al p ope ies o he p ime gap sequence.
We employ he Ramanujan ans o m o he gap equency dis ibu ion o his pu pose, wi h
he explici ca ea ha i s esul s a e illus a i e, no ounda ional o ou p oo s.
8
Figu e 2: Ve i ica ion a ios o κ= 2. All a ios equal 1.000, con i ming he co ec ed olding
a gumen .
Table 4: P ime Gap S a is ics up o X= 109
Me ic Value
Uppe Limi (X) 10,000,000
To al P imes 664,579
To al Gaps 664,578
E en Gaps 50,847,532 (99.9998%)
Odd Gaps 1 (The gap g1= 1 be ween 2 and 3)
Maximum Gap 282
Mean Gap ∼19.67
Median Gap 12
6.1 The Ramanujan T ans o m as a Diagnos ic
The Ramanujan ans o m, R(q), p o ides a spec al ep esen a ion o an a i hme ic unc ion.
Fo he gap equency unc ion, (m), which coun s he numbe o gaps o size m, he ans o m
is de ined as:
R(q) = 1
NgX
m≥1
(m)·cq(m)(9)
whe e Ngis he o al numbe o gaps and cq(m)is he classical Ramanujan sum, cq(m) =
Pgcd(a,q)=1 e2πiam/q. The ans o m is no malized by Ngso ha |R(1)|= 1.
6.2 The Pa i y-D i en Peak a q= 2
We compu ed he Ramanujan spec um o he gap dis ibu ion up o X= 109. The esul ing
magni udes, |R(q)|, a e shown o small qin Table 5and isualized in Figu e 4.
The spec um is o e whelmingly domina ed by he coe icien a q= 2, whe e |R(2)| ≈
0.999999961.
This is no a deep o su p ising esul ; i is a simple and di ec consequence o
pa i y. Since all p ime gaps excep one (g1= 1) a e e en, he gap sequence is almos en i ely
composed o e en numbe s. The Ramanujan sum c2(m) = (−1)mac s as a pa i y de ec o . Fo
9
Table 6: Comple e Iden i y Ve i ica ion o I(1)
n(X)=φ(n)An(X)a X= 10,000,000
n φ(n)An(X)Theo e ical In ensi y Measu ed In ensi y Ra io Pe -Ray In ensi y
2 1 664,577 664,577 664,577 1.000 664,577
3 2 286,009 572,018 572,018 1.000 286,009
4 2 289,181 578,362 578,362 1.000 289,181
5 4 108,346 433,384 433,384 1.000 108,346
6 2 286,009 572,018 572,018 1.000 286,009
7 6 57,723 346,338 346,338 1.000 57,723
8 4 112,534 450,136 450,136 1.000 112,534
9 6 57,091 342,546 342,546 1.000 57,091
10 4 108,346 433,384 433,384 1.000 108,346
B.2 Comple e Ve i ica ion Resul s o κ= 2
Table 7: Comple e Iden i y Ve i ica ion o I(2)
n(X)=φ(n)A2n(X)a X= 10,000,000
n φ(n)A2n(X)Theo e ical In ensi y Measu ed In ensi y Ra io Pe -Ray In ensi y
2 1 289,181 289,181 289,181 1.000 289,181
3 2 286,009 572,018 572,018 1.000 286,009
4 2 112,534 225,068 225,068 1.000 112,534
5 4 108,346 433,384 433,384 1.000 108,346
6 2 109,316 218,632 218,632 1.000 109,316
7 6 57,723 346,338 346,338 1.000 57,723
8 4 36,049 144,196 144,196 1.000 36,049
9 6 57,091 342,546 342,546 1.000 57,091
10 4 29,449 117,796 117,796 1.000 29,449
B.3 Ramanujan Coe icien s (sampled 2≤q≤20)
Table 8: No malized Ramanujan magni udes |R(q)|a X= 10,000,000
q|R(q)|
2 0.999997
3 0.291085
4 0.259458
5 0.184851
6 0.291088
7 0.392004
8 0.385887
9 0.517935
10 0.184848
11 0.614491
12 0.348841
13 0.724538
14 0.392001
15 0.570722
16
(con inued)
q|R(q)|
16 0.486757
17 0.817997
18 0.517935
19 0.865515
20 0.484593
C No a ion and Con en ions
Symbol Meaning
pnn- h p ime
gkp ime gap pk+1 −pk
an in ege inside a gap (used in θ( ))
da gene ic gap size (used in sums/p oduc s)
An(X)numbe o gaps wi h pk+1 ≤Xand n|gk
I(κ)
h/n(X)angula in ensi y on ay h/n wi h olding κ
cq(d)Ramanujan sum
R(q)no malized Ramanujan coe icien
γ(m)Qp|m, p≥3
p−1
p−2
melcm(m, 2)
Re e ences
[1] Y. Zhang, “Bounded gaps be ween p imes,” Annals o Ma hema ics, ol. 179, no. 3, pp.
1121–1174, 2014.
[2] J. Mayna d, “Small gaps be ween p imes,” Annals o Ma hema ics, ol. 181, no. 1, pp.
383–413, 2015.
[3] D. H. J. Polyma h, “Va ian s o he Selbe g sie e, and bounded in e als con aining many
p imes,” Resea ch in he Ma hema ical Sciences, ol. 1, a icle 12, 2014.
[4] K. Fo d, B. G een, S. Konyagin, and T. Tao, “La ge gaps be ween consecu i e p ime num-
be s,” Annals o Ma hema ics, ol. 183, no. 3, pp. 935–974, 2016.
[5] J. Mayna d, “La ge gaps be ween p imes,” Annals o Ma hema ics, ol. 183, no. 3, pp.
915–933, 2016.
[6] H. C amé , “On he o de o magni ude o he di e ence be ween consecu i e p ime num-
be s,” Ac a A i hme ica, ol. 2, pp. 23–46, 1936.
[7] G. H. Ha dy and J. E. Li lewood, “Some p oblems o ‘Pa i io nume o um’; III: On he
exp ession o a numbe as a sum o p imes,” Ac a Ma hema ica, ol. 44, pp. 1–70, 1923.
[8] S. M. Ulam, “A collec ion o ma hema ical p oblems,” In e science T ac s in Pu e and
Applied Ma hema ics, ol. 8, In e science Publishe s, New Yo k, 1960.
[9] R. Sacks, “A new way o isualize he p ime numbe s,” 1994. A ailable: h p://www.
numbe spi al.com
[10] T. M. Apos ol, “In oduc ion o Analy ic Numbe Theo y,” Unde g adua e Tex s in Ma he-
ma ics, Sp inge -Ve lag, New Yo k, 1976.
17
[11] G. H. Ha dy and E. M. W igh , “An In oduc ion o he Theo y o Numbe s,” 6 h ed.,
Ox o d Uni e si y P ess, 2008.
18
A Full P oo s
[Con en om appendix_a_p oo s.md would be inse ed he e in LaTeX o ma ]
B Spec al De ails
[Con en om appendix_b_spec al_de ails.md would be inse ed he e in LaTeX o ma ]
19
Appendix A Algo i hmic De ails
20