OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537 (first 1000 terms from G. C. Greubel)
FORMULA
G.f.: Sum a(n) x^n = Sum A000120(p)*x^p/(1-x^p), p = prime.
MAPLE
MATHEMATICA
Table[DigitCount[n, 2, 1] + PrimeNu[n] - 1, {n, 1, 100}] (* G. C. Greubel, Apr 24 2017 *)
PROG
(PARI) a(n) = hammingweight(n) + omega(n) - 1; \\ Michel Marcus, Apr 25 2017
(Python)
from sympy import primefactors
def a(n): return 0 if n<2 else bin(n)[2:].count("1") + len(primefactors(n)) - 1 # Indranil Ghosh, Apr 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from David W. Wilson.
STATUS
approved