RosettaCodeData/Task/Semiprime/00DESCRIPTION

28 lines
942 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
Semiprime numbers are natural numbers that are products of exactly two (possibly equal) [[prime_number|prime numbers]].
2015-02-20 09:02:09 -05:00
2016-12-05 22:15:40 +01:00
2017-09-23 10:01:46 +02:00
'''Semiprimes'''   are also known as:
:::*   '''semi-primes'''
:::*   '''biprimes'''
:::*   '''bi-primes'''
:::*   ''' ''2-almost'' '''   primes
:::* &nbsp; or simply: &nbsp; ''' ''P<sub>2</sub> '' '''
2016-12-05 22:15:40 +01:00
;Example:
<big> 1679 = 23 &times; 73 </big>
(This particular number was chosen as the length of the [http://en.wikipedia.org/wiki/Arecibo_message Arecibo message]).
;Task;
2015-02-20 09:02:09 -05:00
Write a function determining whether a given number is semiprime.
2017-09-23 10:01:46 +02:00
;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''.
2016-12-05 22:15:40 +01:00
<br><br>