Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Curzon-numbers/J/curzon-numbers-1.j
Normal file
1
Task/Curzon-numbers/J/curzon-numbers-1.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
isCurzon =: 2&$: : (0 = * |&:>: ^)
|
||||
5
Task/Curzon-numbers/J/curzon-numbers-2.j
Normal file
5
Task/Curzon-numbers/J/curzon-numbers-2.j
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
modpow =: {{ m&|@^ }}
|
||||
isCurzon =: {{
|
||||
z =: >: x * y
|
||||
z = >: x z modpow y
|
||||
}}
|
||||
11
Task/Curzon-numbers/J/curzon-numbers-3.j
Normal file
11
Task/Curzon-numbers/J/curzon-numbers-3.j
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
generateCurzons =: {{
|
||||
found =. i. 0x
|
||||
current =. 0x
|
||||
while. 1000 > # found do.
|
||||
if. y isCurzon current do. found =. found , current end.
|
||||
current =. >: current
|
||||
end.
|
||||
y ; (5 10 $ found) ; {: found
|
||||
}}
|
||||
|
||||
('Base';'First 50';'1000th') , generateCurzons"0 +:>:i.5
|
||||
Loading…
Add table
Add a link
Reference in a new issue