Difference between revisions of "ZCubes/Prime Gaps"

From ZCubes Wiki
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 11: Line 11:
 
  ps=PRIMES(100000)
 
  ps=PRIMES(100000)
 
     .map((x,i,d)=>d[i]-d[i-1])
 
     .map((x,i,d)=>d[i]-d[i-1])
     .slice()
+
     .slice(1)
 
  ~
 
  ~
  
  
  
<<[[Learn_ZCubes | Learn ZCubes ]]
 
 
<br/>
 
<br/>
&copy; Copyright 1996-2020, ZCubes, Inc.
+
*[[Z3 | Z3 home]]
 +
*[[Z^3 Language Documentation]]
 +
*[[ZCubes_Videos | ZCubes Videos and Tutorials]]
 +
*[[Main_Page | About ZCubes ]]
 +
<br/>
 +
<br/>
 +
&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.