28 lines
942 B
Plaintext
28 lines
942 B
Plaintext
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
|
|
:::* or simply: ''' ''P<sub>2</sub> '' '''
|
|
|
|
|
|
|
|
;Example:
|
|
<big> 1679 = 23 × 73 </big>
|
|
|
|
(This particular number was chosen as the length of the [http://en.wikipedia.org/wiki/Arecibo_message Arecibo message]).
|
|
|
|
|
|
;Task;
|
|
Write a function determining whether a given number is semiprime.
|
|
|
|
|
|
;See also:
|
|
* The Wikipedia article: [http://mathworld.wolfram.com/Semiprime.html semiprime].
|
|
* The Wikipedia article: [http://mathworld.wolfram.com/AlmostPrime.html almost prime].
|
|
* The OEIS article: [http://oeis.org/A001358 semiprimes] which has a shorter definition: ''the product of two primes''.
|
|
<br><br>
|