A299090 Number of "digits" in the binary representation of the multiset of prime factors of n.
0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 2, 2, 2, 1, 1, 1, 2, 1
Offset: 1
Examples
36 has prime factors {2,2,3,3} with binary representation {2,3}{} so a(36) = 2. Binary representations of the prime multisets of each positive integer begin: {}, {2}, {3}, {2}{}, {5}, {2,3}, {7}, {2}{2}, {3}{}, {2,5}, {11}, {2}{3}, {13}, {2,7}, {3,5}, {2}{}{}.
Links
Programs
-
Mathematica
Table[If[n===1,0,IntegerLength[Max@@FactorInteger[n][[All,2]],2]],{n,100}]
-
PARI
A051903(n) = if((1==n),0,vecmax(factor(n)[, 2])); A299090(n) = if(1==n,0,#binary(A051903(n))); \\ Antti Karttunen, Jul 29 2018
-
Python
from sympy import factorint def A299090(n): return max(factorint(n).values(),default=0).bit_length() # Chai Wah Wu, Apr 11 2025
Formula
If m is a set then bin(m) has only one "digit" m; so a(n) = 1 if n is squarefree.
If m is of the form n*{x} then bin(m) is obtained by listing the binary digits of n and replacing 0 -> {}, 1 -> {x}; so a(p^n) = binary weight of n.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + Sum_{k>=1} (1 - 1/zeta(2^k)) = 1.47221057635756400916... . - Amiram Eldar, Jan 05 2024
Extensions
More terms from Antti Karttunen, Jul 29 2018
Comments