OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
100 is the first term in this sequence since it is 10^2; 10 is a squarefree composite number. All powers 10^m, m > 1 are in the sequence.
36 is not in the sequence since it is 6^2, where 6 is a product of the smallest 2 primes; none of the powers 6^m, m > 1 are in the sequence.
MATHEMATICA
nn = 2^30; ss = Floor@ Sqrt[nn]; p = 3;
s = Complement[
Select[Range[ss], And[SquareFreeQ[#], CompositeQ[#]] &],
NestWhileList[(Set[p, NextPrime[p]]; # p) &, 6, # <= ss &] ];
Union@ Reap[Do[k = 2; While[s[[i]]^k <= nn, Sow[s[[i]]^k]; k++],
{i, Length[s]}] ][[-1, 1]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Dec 10 2023
STATUS
approved