A364215 The number of 1's in the canonical representation of n as a sum of distinct Jacobsthal numbers (A280049).
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, 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, 5, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6, 5, 6, 5, 6, 7, 2, 3
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
DigitCount[Select[Range[200], EvenQ[IntegerExponent[#, 2]] &], 2, 1]
-
PARI
s(n) = if(n < 2, n > 0, n = s(n-1); until(valuation(n, 2)%2 == 0, n++); n); \\ A003159 a(n) = hammingweight(s(n));