OFFSET
1,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
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
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
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Dec 27 2024
STATUS
approved