A381205 a(n) is the cardinality of the set of bases and exponents (including exponents = 1) in the prime factorization of n.
0, 2, 2, 1, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 1, 3, 2, 4, 2, 2, 3, 3, 3, 2, 2, 3, 3, 4, 2, 4, 2, 3, 4, 3, 2, 4, 2, 3, 3, 3, 2, 3, 3, 4, 3, 3, 2, 4, 2, 3, 4, 2, 3, 4, 2, 3, 3, 4, 2, 2, 2, 3, 4, 3, 3, 4, 2, 4, 2, 3, 2, 4, 3, 3, 3, 4, 2, 4
Offset: 1
Examples
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.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Programs
-
Maple
a:= n-> nops({map(i-> i[], ifactors(n)[2])[]}): seq(a(n), n=1..90); # Alois P. Heinz, Feb 18 2025
-
Mathematica
A381205[n_] := If[n == 1, 0, Length[Union[Flatten[FactorInteger[n]]]]]; Array[A381205, 100]
-
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
Comments