A   k-Almost-prime   is a natural number   



n


{\displaystyle n}

   that is the product of   



k


{\displaystyle k}

   (possibly identical) primes.



Example

1-almost-primes,   where   



k
=
1


{\displaystyle k=1}

,   are the prime numbers themselves.

2-almost-primes,   where   



k
=
2


{\displaystyle k=2}

,   are the   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   



1
<=
K
<=
5


{\displaystyle 1<=K<=5}

.



Related tasks

   Semiprime
   Category:Prime Numbers


01.10 F K=1,5;D 3
01.20 Q
 
02.10 S N=I;S P=1;S G=0
02.20 S P=P+1
02.30 I (K-G)2.7,2.7;I (N-P*P)2.7
02.40 S Z=FITR(N/P)
02.50 I (Z*P-N)2.2
02.60 S N=Z;S G=G+1;G 2.4
02.70 I (1-N)2.8;R
02.80 S G=G+1
 
03.10 T "K",%1,K,":"
03.20 S I=2;S C=0
03.30 D 2;I (G-K)3.6,3.4,3.6
03.40 T " ",%3,I
03.50 S C=C+1
03.60 S I=I+1
03.70 I (C-10)3.3
03.80 T !