This is largely pointless, but may be interesting. Below is a process for 
calculating  the function Z(x), for complex value x, where the real part = 0.5, 
and imaginary part > 0. The zeros of
Z(x) are the zeros of the Riemann zeta function, for values with real part = 
0.5.

https://en.wikipedia.org/wiki/Z_function
to see an explanation of the formula: 
http://numbers.computation.free.fr/Constants/Miscellaneous/zetaevaluations.html

NB. Calculation of Z(x), estimate of zeta(x) for x = a +ib where b = 0.5
NB. Riemann-Siegel formula. (from Riemann Zeta Function, H.M Edwards)
C0 =: 0.38268343236508977173, 0.43724046807752044936, 0.13237657548034352333, 
_0.01360502604767418865, _0.01356762197010358088, _0.00162372532314446528, 
0.00029705353733379691,0.00007943300879521469, 0.00000046556124614504, 
_0.00000143272516309551, _0.00000010354847112314, 0.00000001235792708384, 
0.00000000178810838577, _0.00000000003391414393, _0.00000000001632663392
C1 =: 0.02682510262837535, _0.01378477342635185, _0.03849125048223508, 
_0.00987106629906208, 0.00331075976085840, 0.00146478085779542, 
0.00001320794062488,_0.00005922748701847, _0.00000598024258537, 
0.00000096413224562, 0.00000018334733722
C2 =: 0.005188542830293, 0.000309465838807, _0.011335941078299, 
0.002233045741958,0.005196637408862, 0.000343991440762, _0.000591064842747, 
_0.000102299725479, 0.000020888392217,0.000005927665493, _0.000000164238384, 
_0.000000151611998
C3 =: 0.0013397160907, _0.0037442151364, 0.0013303178920, 
0.0022654660765,_0.0009548499998, _0.0006010038459, 0.0001012885828, 
0.0000686573345, _0.0000005985366,_0.0000033316599, _0.0000002191929, 
0.0000000789089, 0.0000000094147
C4 =: 0.00046483389, _0.00100566074, 0.00024044856, 
0.00102830861,_0.00076578609, _0.00020365286, 0.00023212290, 0.00003260215, 
_0.00002557905, _0.00000410746,0.00000117812, 0.00000024456

pi2 =: +: o. 1

theta =: 3 : 0
assert. y > 0
p1 =.  ( * -:@:^.@:(%&pi2)) y
p2 =. --: y
p3 =. -(o. 1) % 8
p4 =. 1 % (48 * y)
p5 =. 7 % (5760 * y ^ 3)
p1 + p2 + p3 + p4 + p5
)

summation =: 3 : 0 "1

v =. >0{y
m =. >1{y
thetav =. theta v
ms =. >: i. m
cos =. 2&o.
s =. +:@:(^&_0.5) * cos@:(thetav&-@:(v&*@:^.))
+/ s ms
)

remainderterms =: 3 : 0
im =. y
v =. %: pi2 %~ y
N =. <. v
p =. v - N
q =. 1 - 2 * p
final =. 0

mv0 =. +/ (({&C0) * (q&^@:+:)) i. # C0
final =. mv0

mv1 =. +/ (({&C1) * (q&^@:+:@:>:)) i. # C1
mv1 =. mv1 * ((im % pi2) ^ _0.5)
final =. final + mv1

mv2 =. +/ (({&C2) * (q&^@:+:)) i. # C2
mv2 =. mv2 * ((im % pi2) ^ _1)
final =. final + mv2

mv3 =. +/ (({&C3) * (q&^@:+:@:>:)) i. # C3
final =. final + mv3

mv4 =. +/ (({&C4) * (q&^@:+:)) i. # C4
final =. final + mv4


final * (_1 ^ <: N) * ((im %  pi2) ^ _0.25)

)


z =: 3 : 0 "0
im =. y
v =. %: pi2 %~ y
N =. <. v
p =. v - N
v1 =. summation im ; N
v2 =. remainderterms im
v1 + v2
)

load 'plot'

x =: steps 0.1 100 1000
plot x; z x


On the graph you can see the zeros... and verify using the known zeros of the 
zeta function here http://www.dtc.umn.edu/~odlyZko/zeta_tables/zeros2
The first one is at about 14.13, and they appear in no particular pattern(?) 
from there.

Anyway, as I said, this is largely pointless, but may interest some. 

Thanks,
Jon
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to