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”).
%I #7 Jul 15 2023 05:52:53
%S 1,2,1,2,3,2,3,2,3,4,1,2,3,2,3,4,3,4,3,4,5,2,3,2,3,4,3,4,3,4,5,2,3,4,
%T 3,4,5,4,5,4,5,6,1,2,3,2,3,4,3,4,3,4,5,2,3,4,3,4,5,4,5,4,5,6,3,4,3,4,
%U 5,4,5,4,5,6,3,4,5,4,5,6,5,6,5,6,7,2,3
%N The number of 1's in the canonical representation of n as a sum of distinct Jacobsthal numbers (A280049).
%H Amiram Eldar, <a href="/A364215/b364215.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A007953(A280049(n)).
%F a(n) = A000120(A003159(n)).
%F a(A007583(n)) = 1.
%t DigitCount[Select[Range[200], EvenQ[IntegerExponent[#, 2]] &], 2, 1]
%o (PARI) s(n) = if(n < 2, n > 0, n = s(n-1); until(valuation(n, 2)%2 == 0, n++); n); \\ A003159
%o a(n) = hammingweight(s(n));
%Y Cf. A000120, A003159, A007583, A007953, A280049.
%K nonn,base,easy
%O 1,2
%A _Amiram Eldar_, Jul 14 2023