Difference between revisions of "ZCubes/Twin Primes & Bruns Theorem"
Jump to navigation
Jump to search
(Created page with "==Twin Primes & Bruns Theorem== <br/> Twin primes are prime numbers separated by 2. Viggo Bruns theorem states that sum of reciprocals of twin primes is convergent. This video...") |
|||
Line 8: | Line 8: | ||
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | ||
+ | ==Code== | ||
+ | ps=PRIMES(1000) | ||
+ | .filter((x,i,d)=>d[i]-d[i-1]==2) | ||
+ | .$("[x-2,x]") | ||
+ | ps.map(r=>1/r[0]+1/r[1])~ | ||
+ | |||
+ | ps=PRIMES(10000) | ||
+ | .filter((x,i,d)=>d[i]-d[i-1]==2) | ||
+ | .$("[x-2,x]") | ||
<<[[Learn_ZCubes | Learn ZCubes ]] | <<[[Learn_ZCubes | Learn ZCubes ]] | ||
<br/> | <br/> | ||
© Copyright 1996-2020, ZCubes, Inc. | © Copyright 1996-2020, ZCubes, Inc. |
Revision as of 01:41, 19 March 2020
Twin Primes & Bruns Theorem
Twin primes are prime numbers separated by 2. Viggo Bruns theorem states that sum of reciprocals of twin primes is convergent. This video demonstrates how to test this theorem, using ZCubes. You will observe that the computation is simple and easy in ZCubes, as it takes only 4 lines of code.
Video
Code
ps=PRIMES(1000) .filter((x,i,d)=>d[i]-d[i-1]==2) .$("[x-2,x]")
ps.map(r=>1/r[0]+1/r[1])~
ps=PRIMES(10000) .filter((x,i,d)=>d[i]-d[i-1]==2) .$("[x-2,x]")
<< Learn ZCubes
© Copyright 1996-2020, ZCubes, Inc.