OFFSET
1,2
COMMENTS
The prime factorization of 1 is the empty set, so a(1) = 0 by convention.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
EXAMPLE
a(16) = 2 because 12 = 2^3, the set of these bases and exponents is {2, 3} and its size is 2.
a(31500) = 5 because 31500 = 2^2*3^2*5^3*7^1, the set of these bases and exponents is {1, 2, 3, 5, 7} and its size is 5.
MAPLE
a:= n-> nops({map(i-> i[], ifactors(n)[2])[]}):
seq(a(n), n=1..90); # Alois P. Heinz, Feb 18 2025
MATHEMATICA
PROG
(PARI) a(n) = my(f=factor(n)); #setunion(Set(f[, 1]), Set(f[, 2])); \\ Michel Marcus, Feb 18 2025
(Python)
from sympy import factorint
def a(n): return len(set().union(*(set(pe) for pe in factorint(n).items())))
print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Feb 18 2025
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Paolo Xausa, Feb 17 2025
STATUS
approved