ϖ=1/1168;

BinarySearch[f_,a_,b_]/;b==a+1:=b
BinarySearch[f_,a_,b_]:=(Print[{a,b}];With[{m=Floor[(a+b)/2]},If[f[m],BinarySearch[f,a,m],BinarySearch[f,m,b]]])

Before Terry' s comment #47

ω[k0_,l0_,ϖ_]:=(1/((k0+2l0)!))Binomial[2l0,l0](((2(2l0+1))/(l0+1))((k0(1-κ2[k0,l0,ϖ]))/(k0+2l0+1))-((4(1+κ1[k0,l0,ϖ]))/(1+4ϖ)))
κ1[k0_,l0_,ϖ_]:=δ1[k0,ϖ](1+((δ2[k0])^2)+Log[293]k0)Binomial[k0+2l0,k0]
κ2[k0_,l0_,ϖ_]:=δ1[k0,ϖ](1+4ϖ)(1+((δ2[k0])^2)+Log[293]k0)Binomial[k0+2l0+1,k0-1]
δ1[k0_,ϖ_]:=(((1+4ϖ))^(-k0))

δ2[k0_]:=δ2[k0]=Sum[((((Log[293]k0))^ν)/(ν!)),{ν,0,292}]

(* Terry's improved δ2 from http://sbseminar.wordpress.com/2013/05/30/i-just-cant-resist-there-are-infinitely-many-pairs-of-primes-at-most-59470640-apart/#comment-23465 *)
Clear[δ2]
δ2[k0_]:=δ2[k0]=Product[1+k0 Log[1+(1/j)],{j,1,292}]

(* Terry's next improvement, based on estimating (Subscript[Σ, 2]) more carefully *)
δ2[k0_,j_]:=δ2[k0,j]=Product[1+k0 Log[1+(1/i)],{i,1,j}]
κ1[k0_,l0_,ϖ_]:=(δ1[k0,ϖ]+Sum[((δ1[k0,ϖ])^j)((δ2[k0,j])^2),{j,1,1/(4ϖ)}]+δ1[k0,ϖ]k0 Log[1+(1/(4ϖ))])Binomial[k0+2l0,k0]
κ2[k0_,l0_,ϖ_]:=(δ1[k0,ϖ](1+4ϖ)+Sum[((δ1[k0,ϖ])^j)(1+4ϖ)((δ2[k0,j])^2),{j,1,1/(4ϖ)}]+δ1[k0,ϖ](1+4ϖ)k0 Log[1+(1/(4ϖ))])Binomial[k0+2l0+1,k0-1]

k0=3.5*(10^6);

Select[Range[140,680],ω[k0,#,ϖ]>0&]

BinarySearch[f_,a_,b_]/;b==a+1:=b
BinarySearch[f_,a_,b_]:=(Print[{a,b}];With[{m=Floor[(a+b)/2]},If[f[m],BinarySearch[f,a,m],BinarySearch[f,m,b]]])

BinarySearch[Function[k,Length[Select[Range[150,672],ω[N[k],N[#],ϖ]>0&]]>0],0,2950000]

Select[Range[150,208],ω[866805.,N[#],ϖ]>0&]

N[ω[866805,164,ϖ]]

N[ω[866805-1,164,ϖ]]

2Prime[36716+Ceiling[2618607/2]+1]

Prime[11651+Ceiling[866805/2]+1]+Prime[11651+Floor[866805/2]+1]

PrimePi[866805]

After Terry' s comment #47

κ[k0_,l0_,ϖ_]:=Sum[(((1-((2n ϖ)/(1+4ϖ))))^(k0/2+l0))Product[1+3k0 Log[1+(1/j)],{j,1,n}],{n,1,2+(1/(2ϖ))-1}]

f[k0_,l0_,ϖ_]:=((1+4ϖ)/((1+(1/(2l0+1)))(1+((2l0+1)/k0))(1+κ[k0,l0,ϖ])))-1

g[k0_,ϖ_]:=With[{P=50},FindMaximum[{f[N[k0,P],l0,ϖ],l0≥0},{l0,800},WorkingPrecision->P]]

ϖ = 1/1168;

ϖ=1/1168;

g[3500000,ϖ]

g[400000,ϖ]

g[200000,ϖ]

BinarySearch[g[#,ϖ][[1]]>0&,200000,400000]

g[%,ϖ]

f[341640.,291,ϖ]

f[341640.,291.7,ϖ]

N[f[341640,(2917/10),ϖ]]

f[N[341640,50],292,ϖ]

(* This is with an older value of m, that sufficed for k_0 = 866,805: *)

2Prime[11651+341640/2-1]

ϖ = 1/1040 (* Conjectured feasible by v08ltu at http://mathoverflow.net/questions/132632/tightening-zhangs-bound-closed *)

ϖ=1/1040;

g[400000,ϖ]

g[200000,ϖ]

BinarySearch[g[#,ϖ][[1]]>0&,200000,400000]

ϖ = 1/224; (* Conjectured feasible by v08ltu at http://polymathprojects.org/2013/06/04/polymath-proposal-bounded-gaps-between-primes/#comment-19961 *)

ϖ=1/224;

g[100000,ϖ]

g[10000,ϖ]

BinarySearch[g[#,ϖ][[1]]>0&,10000,100000]

Ignoring κ

κ[k0_,l0_,ϖ_]:=0

k0=.

Solve[D[f[k0,l0,ϖ0],l0]==0,l0]

Solve[f[k0,(1/2) (-1+(Sqrt[k0])),ϖ0]==0]

k[ϖ_]:=Ceiling[((1+2 ϖ+(Sqrt[1+4 ϖ]))/(8 (ϖ^2)))]

k[ϖ]

k[1/42]