OFFSET
1,5
EXAMPLE
The a(21) = 8 positive integers less than and relatively prime to 21 that are not perfect powers are {2, 5, 10, 11, 13, 17, 19, 20}.
MATHEMATICA
Table[Length[Select[Range[2, n], And[GCD@@FactorInteger[#][[All, 2]]==1, GCD[n, #]==1]&]], {n, 50}]
PROG
(PARI) a(n) = sum(k=2, n-1, !ispower(k) && (gcd(n, k) == 1)); \\ Michel Marcus, May 15 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 14 2018
STATUS
approved