cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A381205 a(n) is the cardinality of the set of bases and exponents (including exponents = 1) in the prime factorization of n.

This page as a plain text file.
%I A381205 #18 Feb 22 2025 09:57:14
%S A381205 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,
%T A381205 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,
%U A381205 3,4,2,2,2,3,4,3,3,4,2,4,2,3,2,4,3,3,3,4,2,4
%N A381205 a(n) is the cardinality of the set of bases and exponents (including exponents = 1) in the prime factorization of n.
%C A381205 The prime factorization of 1 is the empty set, so a(1) = 0 by convention.
%H A381205 Paolo Xausa, <a href="/A381205/b381205.txt">Table of n, a(n) for n = 1..10000</a>
%e A381205 a(16) = 2 because 12 = 2^3, the set of these bases and exponents is {2, 3} and its size is 2.
%e A381205 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.
%p A381205 a:= n-> nops({map(i-> i[], ifactors(n)[2])[]}):
%p A381205 seq(a(n), n=1..90);  # _Alois P. Heinz_, Feb 18 2025
%t A381205 A381205[n_] := If[n == 1, 0, Length[Union[Flatten[FactorInteger[n]]]]];
%t A381205 Array[A381205, 100]
%o A381205 (PARI) a(n) = my(f=factor(n)); #setunion(Set(f[,1]), Set(f[,2])); \\ _Michel Marcus_, Feb 18 2025
%o A381205 (Python)
%o A381205 from sympy import factorint
%o A381205 def a(n): return len(set().union(*(set(pe) for pe in factorint(n).items())))
%o A381205 print([a(n) for n in range(1, 91)]) # _Michael S. Branicky_, Feb 18 2025
%Y A381205 Cf. A051674 (positions of ones), A381201, A381202, A381203, A381204, A381212.
%K A381205 nonn,easy
%O A381205 1,2
%A A381205 _Paolo Xausa_, Feb 17 2025