OFFSET
1,2
COMMENTS
The asymptotic density of this sequence is zeta(3)/zeta(2) = 0.730762... (A253905).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
The first 5 cubefree numbers are 1, 2, 3, 4, and 5. The 1st, 2nd, 3rd, and 5th, 1, 2, 3, and 5, are squarefree. Therefore, the first 4 terms of this sequence are 1, 2, 3, and 5.
MATHEMATICA
freeQ[n_, k_] := AllTrue[FactorInteger[n], Last[#] < k &]; Position[Select[Range[200], freeQ[#, 3] &], _?(freeQ[#1, 2] &), Heads -> False] // Flatten
PROG
(PARI) isfree(n, k) = n == 1 || vecmax(factor(n)[, 2]) < k;
lista(kmax) = {my(f, c = 0); for(k = 1, kmax, if(isfree(k, 3), c++; if(isfree(k, 2), print1(c, ", ")))); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Mar 14 2024
STATUS
approved