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.
%I A035531 #22 Sep 06 2023 21:13:05 %S A035531 0,1,2,1,2,3,3,1,2,3,3,3,3,4,5,1,2,3,3,3,4,4,4,3,3,4,4,4,4,6,5,1,3,3, %T A035531 4,3,3,4,5,3,3,5,4,4,5,5,5,3,3,4,5,4,4,5,6,4,5,5,5,6,5,6,7,1,3,4,3,3, %U A035531 4,5,4,3,3,4,5,4,5,6,5,3,3,4,4,5,5,5,6,4,4,6,6,5,6,6,7,3,3,4,5,4,4,6,5,4,6,5,5,5,5,7,7 %N A035531 a(n) = A000120(n) + A001221(n) - 1. %H A035531 Antti Karttunen, <a href="/A035531/b035531.txt">Table of n, a(n) for n = 1..65537</a> (first 1000 terms from G. C. Greubel) %F A035531 G.f.: Sum a(n) x^n = Sum A000120(p)*x^p/(1-x^p), p = prime. %p A035531 A035531 := proc(n) %p A035531 A000120(n)+A001221(n)-1 ; %p A035531 end proc: %p A035531 seq(A035531(n),n=1..100) ; # _R. J. Mathar_, Mar 12 2018 %t A035531 Table[DigitCount[n, 2, 1] + PrimeNu[n] - 1, {n, 1, 100}] (* _G. C. Greubel_, Apr 24 2017 *) %o A035531 (PARI) a(n) = hammingweight(n) + omega(n) - 1; \\ _Michel Marcus_, Apr 25 2017 %o A035531 (Python) %o A035531 from sympy import primefactors %o A035531 def a(n): return 0 if n<2 else bin(n)[2:].count("1") + len(primefactors(n)) - 1 # _Indranil Ghosh_, Apr 25 2017 %Y A035531 Cf. A000120, A001221. %Y A035531 Cf. also A336149. %K A035531 nonn,easy %O A035531 1,3 %A A035531 _Daniele Parisse_ %E A035531 More terms from _David W. Wilson_.