Carmichael 3 strong pseudoprimes: Difference between revisions
Content added Content deleted
(→Tcl: Added implementation) |
m (→{{header|REXX}}: added whitespace to the REXX section header, added a comment to the output section. -- ~~~~) |
||
Line 476: | Line 476: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
Note that REXX's version of '''modulus''' ('''//''') is really a ''remainder'' function, so a version of |
Note that REXX's version of '''modulus''' ('''//''') is really a ''remainder'' function, so a version of |
||
<br>the '''modulus''' function was hard-coded below (when using a negative value). |
<br>the '''modulus''' function was hard-coded below (it was necessary to use '''modulus''' instead of '''remainder''' when using a negative value). |
||
===numbers in order of calculation=== |
===numbers in order of calculation=== |
||
<lang rexx>/*REXX program calculates Carmichael 3-strong pseudoprimes (up to N).*/ |
<lang rexx>/*REXX program calculates Carmichael 3-strong pseudoprimes (up to N).*/ |
||
Line 517: | Line 517: | ||
!.x=1; return 1</lang> |
!.x=1; return 1</lang> |
||
'''output''' when using the default input |
'''output''' when using the default input |
||
<br><br>The Carmichael numbers were grouped by the first Carmichael number. |
|||
<pre style="height: |
<pre style="height:50ex;overflow:scroll"> |
||
──────── a Carmichael number: 3 ∙ 11 ∙ 17 |
──────── a Carmichael number: 3 ∙ 11 ∙ 17 |
||
Line 651: | Line 652: | ||
!.x=1; return 1</lang> |
!.x=1; return 1</lang> |
||
'''output''' when using the default input |
'''output''' when using the default input |
||
<pre style="height: |
<pre style="height:50ex;overflow:scroll"> |
||
──────── a Carmichael number: 3 ∙ 11 ∙ 17 |
──────── a Carmichael number: 3 ∙ 11 ∙ 17 |
||