Anonymous user
Carmichael 3 strong pseudoprimes: Difference between revisions
Carmichael 3 strong pseudoprimes (view source)
Revision as of 05:19, 30 December 2012
, 11 years agoShorer D entry
m (Less imports in D entry) |
(Shorer D entry) |
||
Line 28:
=={{header|D}}==
From the Python entry, with several changes. Imports the third (extensible) D entry of the Sieve of Eratosthenes Task.
<lang d>import std.stdio, std.typecons, sieve_of_eratosthenes3;
struct Carmichael {
immutable p2 = 1 +
immutable p3 = 1 + (p1 * p2 /
if (IsPrime(p3) && (p2
// A int[3] literal
const tri =
result =
if
}▼
}
}
}
void main() {
}</lang>
{{out}}
|