login
A303946
Numbers that are neither squarefree nor perfect powers.
4
12, 18, 20, 24, 28, 40, 44, 45, 48, 50, 52, 54, 56, 60, 63, 68, 72, 75, 76, 80, 84, 88, 90, 92, 96, 98, 99, 104, 108, 112, 116, 117, 120, 124, 126, 132, 135, 136, 140, 147, 148, 150, 152, 153, 156, 160, 162, 164, 168, 171, 172, 175, 176, 180, 184, 188, 189
OFFSET
1,1
COMMENTS
First differs from A059404 at a(40) = 147, A059404(40) = 144.
First differs from A126706 at a(6) = 40, A126706(6) = 36.
LINKS
FORMULA
a(n) ~ n/k, where k = 1 - 1/zeta(2) = 1 - 6/Pi^2 = A229099. - Charles R Greathouse IV, Jun 01 2018
MAPLE
filter:= proc(n) local F;
F:= map(t->t[2], ifactors(n)[2]);
max(F)>1 and igcd(op(F))=1
end proc:
select(filter, [$1..1000]); # Robert Israel, May 06 2018
MATHEMATICA
Select[Range[200], !SquareFreeQ[#] && GCD@@FactorInteger[#][[All, 2]] == 1 &]
PROG
(PARI) isok(n) = !issquarefree(n) && !ispower(n); \\ Michel Marcus, May 05 2018
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A303946(n):
def f(x): return int(n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 19 2024
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 03 2018
STATUS
approved