VOOZH about

URL: https://oeis.org/A389146

⇱ A389146 - OEIS


login
A389146
Classification of nonnegative integers into numbers in {0, 1}, primes, proper prime powers, weak composites, and powerful numbers that are not prime powers.
1
0, 0, 1, 1, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 3, 2, 1, 3, 1, 3, 3, 3, 1, 3, 2, 3, 2, 3, 1, 3, 1, 2, 3, 3, 3, 4, 1, 3, 3, 3, 1, 3, 1, 3, 3, 3, 1, 3, 2, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 1, 3, 3, 2, 3, 3, 1, 3, 3, 3, 1, 4, 1, 3, 3, 3, 3, 3, 1, 3, 2, 3, 1, 3, 3, 3, 3
OFFSET
0,5
COMMENTS
a(0) = a(1) = 0, a(n) = 1 + 2*[omega(n) > 1] + [rad(n)^2 | n], Iverson brackets, where omega(n) = A001221(n) and rad(n) = A007947(n) is the squarefree kernel of n.
a(n) = 0 for n in {0, 1} by definition.
a(n) = 1 for n in A000040 (i.e., prime n = p).
a(n) = 2 for n in A246547 (i.e., proper prime power n = p^m, m > 1).
a(n) = 3 for n in A389065 = A120944 U A126706 (i.e., composite and weak n).
a(n) = 4 for n in A286708 (i.e., powerful numbers that are not prime powers).
LINKS
FORMULA
a(0) = a(1) = 0, a(n) = 4 - 2*[is n a prime power?] - [is n not powerful?].
a(0) = a(1) = 0, a(n) = 4 - 2*A010055(n) - (1 - A112526(n)).
EXAMPLE
Prime
Class Example power? Powerful? a(n) Category
------------------------------------------------------------------------
n in A000040 7 True False 1 primes
n in A246547 8 True True 2 proper prime powers
n in A389065 10 False False 3 weak composites (squarefree)
n in A389065 12 False False 3 weak composites (nonsquarefree)
n in A286708 36 False True 4 powerful but not prime power
MATHEMATICA
rad[x_] := Times @@ FactorInteger[x][[All, 1]]; {0, 0}~Join~Table[1 + 2*Boole[! PrimePowerQ[n]] + Boole[Divisible[n, rad[n]^2]], {n, 2, 105}]
PROG
(SageMath)
def rad(n: int) -> int:
return n if n < 2 else prod(p[0] for p in list(factor(n)))
def A389146(lim: int = 105) -> list[int]:
return [0, 0] + [1 + 2 * int(not is_prime_power(n)) + int(n % (rad(n)**2) == 0) for n in range(2, lim + 1) ]
print(A389146(87)) # Peter Luschny, Oct 08 2025
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Sep 26 2025
STATUS
approved