Difference between revisions of "ZCubes/Prime Gaps"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "==Prime Gaps== <br/> This video shows how to compute the gap between the prime numbers using ZCubes. You can easily generate large number of primes and get the gaps of these a...")
 
 
(2 intermediate revisions by one other user not shown)
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(100000)
 +
    .map((x,i,d)=>d[i]-d[i-1])
 +
    .slice(1)
 +
~
  
  
<<[[Learn_ZCubes | Learn ZCubes ]]
+
 
 +
<br/>
 +
*[[Z3 | Z3 home]]
 +
*[[Z^3 Language Documentation]]
 +
*[[ZCubes_Videos | ZCubes Videos and Tutorials]]
 +
*[[Main_Page | About ZCubes ]]
 +
<br/>
 
<br/>
 
<br/>
&copy; Copyright 1996-2020, ZCubes, Inc.
+
&copy; Copyright 1996-2021, ZCubes, Inc.

Latest revision as of 01:30, 11 March 2021

Prime Gaps


This video shows how to compute the gap between the prime numbers using ZCubes. You can easily generate large number of primes and get the gaps of these as a series and conduct further analysis.

Video


Prime Gaps














Code

ps=PRIMES(100000)
    .map((x,i,d)=>d[i]-d[i-1])
    .slice(1)
~





© Copyright 1996-2021, ZCubes, Inc.