OFFSET
1,1
COMMENTS
Sometimes nonsquarefree numbers are misnamed squareful numbers (see 1st comment of A013929). Indeed, every squareful number > 1 is nonsquarefree, but the converse is false. This sequence = A013929 \ A001694 and consists of these counterexamples.
This sequence is not a duplicate: the first 16 terms (<= 68) are the same first 16 terms of A059404, A323055, A242416 and A303946, then 72 is the 17th term of these 4 sequences. Also, the first 37 terms (<= 140) are the same first 37 terms of A317616 then 144 is the 38th term of this last sequence.
From Amiram Eldar, Sep 17 2023: (Start)
Called "hybrid numbers" by Jakimczuk (2019).
These numbers have a unique representation as a product of two numbers > 1, one is squarefree (A005117) and the other is powerful (A001694).
Equivalently, numbers that have in their prime factorization at least one exponent that is equal to 1 and at least one exponent that is larger than 1.
The asymptotic density of this sequence is 1 - 1/zeta(2) (A229099). (End)
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Rafael Jakimczuk, Powerful Numbers Multiple of a Set of Primes and Hybrid Numbers, 2019.
FORMULA
Sum_{n>=1} 1/a(n)^s = 1 + zeta(s) - zeta(s)/zeta(2*s) - zeta(2*s)*zeta(3*s)/zeta(6*s), s > 1. - Amiram Eldar, Sep 17 2023
EXAMPLE
18 = 2 * 3^2 is nonsquarefree as it is divisible by the square 3^2, but it is not squareful because 2 divides 18 but 2^2 does not divide 18, hence 18 is a term.
72 = 2^3 * 3^2 is nonsquarefree as it is divisible by the square 3^2, but it is also squareful because primes 2 and 3 divide 72, and 2^2 and 3^2 divide also 72, so 72 is not a term.
MAPLE
filter:= proc(n) local F;
F:= ifactors(n)[2][.., 2];
max(F) > 1 and min(F) = 1
end proc:
select(filter, [$1..1000]); # Robert Israel, Sep 15 2024
MATHEMATICA
Select[Range[225], Max[(e = FactorInteger[#][[;; , 2]])] > 1 && Min[e] == 1 &] (* Amiram Eldar, Feb 24 2020 *)
PROG
(PARI) isok(m) = !issquarefree(m) && !ispowerful(m); \\ Michel Marcus, Feb 24 2020
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A332785(n):
def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x):
c, l, j = n-1+squarefreepi(integer_nthroot(x, 3)[0])+squarefreepi(x), 0, isqrt(x)
while j>1:
k2 = integer_nthroot(x//j**2, 3)[0]+1
w = squarefreepi(k2-1)
c += j*(w-l)
l, j = w, isqrt(x//k2**3)
return c-l
return bisection(f, n, n) # Chai Wah Wu, Sep 14 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bernard Schott, Feb 24 2020
STATUS
approved