17 lines
681 B
Plaintext
17 lines
681 B
Plaintext
A [[wp:Almost prime|k-Almost-prime]] is a natural number <math>n</math> that is the product of <math>k</math> (possibly identical) primes.
|
|
|
|
|
|
;Example:
|
|
1-almost-primes, where <math>k=1</math>, are the prime numbers themselves.
|
|
<br>2-almost-primes, where <math>k=2</math>, are the [[Semiprime|semiprimes]].
|
|
|
|
|
|
;Task:
|
|
Write a function/method/subroutine/... that generates k-almost primes and use it to create a table here of the first ten members of k-Almost primes for <math>1 <= K <= 5</math>.
|
|
|
|
|
|
;Related tasks:
|
|
* [[Semiprime]]
|
|
* [[:Category:Prime Numbers]]
|
|
<br><br>
|