Difference between revisions of "ZCubes/Devil's Primes"
Jump to navigation
Jump to search
(→Video) |
(→Video) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
==Video== | ==Video== | ||
<br/> | <br/> | ||
− | {{#ev:youtube|_0N7c5JnKT8|480|left|Devil Primes}} | + | {{#ev:youtube|_0N7c5JnKT8|480|left|Devil's Primes}} |
<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/> | ||
Line 17: | Line 17: | ||
.filter(r=>r[1][0])) | .filter(r=>r[1][0])) | ||
− | |||
− | |||
<br/> | <br/> | ||
− | © Copyright 1996- | + | *[[Z3 | Z3 home]] |
+ | *[[Z^3 Language Documentation]] | ||
+ | *[[ZCubes_Videos | ZCubes Videos and Tutorials]] | ||
+ | *[[Main_Page | About ZCubes ]] | ||
+ | <br/> | ||
+ | <br/> | ||
+ | © Copyright 1996-2021, ZCubes, Inc. |
Latest revision as of 04:05, 22 September 2021
Devil's Primes
This video computes the devil's primes, for example, the number 16661, 1 followed by thirteen 0s then 666 and then thirteen 0s and then ending with 1. These are called devil's prime due to common beliefs around the numbers 666 and 13 etc. Z has a built-in function to check if a number is a prime number and also can deal with large integer computations. This ability opens up our capability to discover interesting numbers and patterns and their specialties.
Video
Code-Devil's Primes
ISPRIME(1000000000000066600000000000001<>n)
ops.on; (n=>(((10n^(n+1)+(666))*(10n^(n-1)))+1))@1..20 (n=>(((10n^(n+1)+(666))*(10n^(n-1)))+1))@2..200 a.map((x,i)=>([i,ISPRIME(x)])) .filter(r=>r[1][0]))
© Copyright 1996-2021, ZCubes, Inc.