OFFSET
1,1
COMMENTS
Density is Sum_{p >= 2} 1/p * Product_{q <= p} (1 - 1/q) which is around 0.65. (In the sum and product, p and q are restricted to primes.) - Charles R Greathouse IV, Jan 09 2022
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
50 = 2^1 * 5^2; least prime factor is 2, whose exponent is 1, so 50 is a term.
MATHEMATICA
mi[x_] := Part[Flatten[FactorInteger[x]], 1] k=0; Do[s=mi[n]; If[Equal[GCD[s, n/s], 1]&&!PrimeQ[n], Print[n]], {n, 2, 256}]
Select[Range[150], CompositeQ[#]&&FactorInteger[#][[1, 2]]==1&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 23 2021 *)
PROG
(PARI) is(n, f=factor(n))=n>1 && f[1, 2]==1 \\ Charles R Greathouse IV, Jan 09 2022
(PARI) is(n)=forprime(p=2, 97, if(n%p==0, return(n%p^2>0))); !ispower(n) && factor(n)[1, 2]==1 \\ Charles R Greathouse IV, Jan 09 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Feb 21 2003
EXTENSIONS
Edited by Jon E. Schoenfield, Jul 10 2018
STATUS
approved