Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
31
Task/Chowla-numbers/Quackery/chowla-numbers.quackery
Normal file
31
Task/Chowla-numbers/Quackery/chowla-numbers.quackery
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
[ 2 max
|
||||
dup sqrt+
|
||||
iff 0 else [ dup negate ]
|
||||
unrot
|
||||
times
|
||||
[ dup i^ 1+ /mod
|
||||
0 = iff
|
||||
[ i^ 1+ +
|
||||
swap dip + ]
|
||||
else drop ]
|
||||
1+ - ] is chowla ( n --> n )
|
||||
|
||||
37 times
|
||||
[ say "chowla("
|
||||
i^ 1+ dup echo
|
||||
say ")= "
|
||||
chowla echo cr ]
|
||||
cr
|
||||
' [ 100 1000 10000 100000 1000000 10000000 ]
|
||||
witheach
|
||||
[ 0 over 2 - times
|
||||
[ i^ 2 + chowla 0 = + ]
|
||||
say "There are " echo
|
||||
say " primes less than "
|
||||
echo cr ]
|
||||
cr
|
||||
35000000 2 - times
|
||||
[ i^ 2 + dup chowla 1+ = if
|
||||
[ i^ 2 + echo
|
||||
say " is perfect"
|
||||
cr ] ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue