Difference between revisions of "ZCubes/Prime Gaps"

From ZCubes Wiki
Jump to navigation Jump to search
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)
 
  ~
 
  ~
  

Revision as of 04:03, 18 March 2020

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)
~


<< Learn ZCubes
© Copyright 1996-2020, ZCubes, Inc.