Numbers with special factorisation

We know that any natural number $n$ can be decomposed as $p_1^{k_1}p_2^{k_2}...p_n^{k_n}$. I am looking for numbers which have $k_1=k_2=k_3=....=k_n=1$ i.e. given a number n, identify if it has all the $k_i=1$. I am looking for fast solutions, heuristics are welcome. One can assume that primes upto $n$ are stored.

Edit: $p_1, p_2, ....p_n$ are any primes and not necessarily the first n primes.

• This is usually referred to as $p_n$-primorial. It is written $p_n!!$ or $p_n\#.$ The numbers of this type are 2,6,30,210,... etc. – daniel Dec 11 '14 at 12:49
• But I don't know what you mean when you say you are looking for solutions. – daniel Dec 11 '14 at 13:01
• I presume they mean given a number $n$ test whether it is of that form. – meta Dec 11 '14 at 13:47
• hmmm....so I suppose I am looking for a test for squarefree numbers. – sudeepdino008 Dec 11 '14 at 15:58
• No one has found a way to test numbers for squarefreeness that's any faster than factoring them. See, for example, mathoverflow.net/questions/16098/… – Gerry Myerson Dec 12 '14 at 9:14