Semiprime: Difference between revisions

Content added Content deleted
m (→‎version 3, with memoization: fixed an HTML tag.)
(added aliases, and also links (URLs).)
Line 2: Line 2:


Semiprime numbers are natural numbers that are products of exactly two (possibly equal) [[prime_number|prime numbers]].
Semiprime numbers are natural numbers that are products of exactly two (possibly equal) [[prime_number|prime numbers]].


'''Semiprimes'''   are also known as:
:::*   '''semi-primes'''
:::*   '''biprimes'''
:::*   '''bi-primes'''
:::*   ''' ''2-almost'' '''   primes
:::* &nbsp; or simply: &nbsp; ''' ''P<sub>2</sub> '' '''





Line 12: Line 21:
;Task;
;Task;
Write a function determining whether a given number is semiprime.
Write a function determining whether a given number is semiprime.


;See also:
* The Wikipedia article: &nbsp; [http://mathworld.wolfram.com/Semiprime.html semiprime].
* The Wikipedia article: &nbsp; [http://mathworld.wolfram.com/AlmostPrime.html almost prime].
* The OEIS article: &nbsp; [http://oeis.org/A001358 semiprimes] &nbsp; which has a shorter definition: ''the product of two primes''.
<br><br>
<br><br>