login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A377369
a(n) = total number of bits in the binary representation of the prime factorization of n (including exponents > 1).
2
0, 2, 2, 4, 3, 4, 3, 4, 4, 5, 4, 6, 4, 5, 5, 5, 5, 6, 5, 7, 5, 6, 5, 6, 5, 6, 4, 7, 5, 7, 5, 5, 6, 7, 6, 8, 6, 7, 6, 7, 6, 7, 6, 8, 7, 7, 6, 7, 5, 7, 7, 8, 6, 6, 7, 7, 7, 7, 6, 9, 6, 7, 7, 5, 7, 8, 7, 9, 7, 8, 7, 8, 7, 8, 7, 9, 7, 8, 7, 8, 5, 8, 7, 9, 8, 8, 7, 8, 7, 9
OFFSET
1,2
EXAMPLE
a(10) = 5 because 10 = 2*5 = 10_2*101_2 (5 total bits).
a(18) = 6 because 18 = 2*3^2 = 10_2*11_2^10_2 (6 total bits).
MATHEMATICA
A377369[n_] := Total[BitLength[Select[Flatten[FactorInteger[n]], # > 1 &]]];
Array[A377369, 100]
PROG
(Python)
from sympy import factorint
def a(n): return sum(len(bin(p)[2:])+(len(bin(e)[2:]) if e>1 else 0) for p, e in factorint(n).items())
print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Dec 27 2024
(PARI) a(n)={my(f=factor(n)); sum(i=1, #f~, 1 + logint(f[i, 1], 2) + (f[i, 2]>1) + logint(f[i, 2], 2))} \\ Andrew Howroyd, Dec 29 2024
CROSSREFS
Cf. A050252 (analogous for base 10).
Cf. A070939.
Sequence in context: A338756 A078317 A105016 * A074747 A128248 A347659
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Dec 27 2024
STATUS
approved