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 A006364 M4060 #48 Sep 07 2024 08:53:29 %S A006364 0,1,6,7,10,11,12,13,18,19,20,21,24,25,30,31,34,35,36,37,40,41,46,47, %T A006364 48,49,54,55,58,59,60,61,66,67,68,69,72,73,78,79,80,81,86,87,90,91,92, %U A006364 93,96,97,102,103,106,107,108,109,114,115,116,117,120,121,126,127,130,131,132 %N A006364 Numbers k with an even number of 1's in binary, ignoring last bit. %C A006364 Equivalently, numbers k such that k has an odd number of 1's in binary if and only if k is odd. - _Aaron Weiner_, Jun 19 2013 %C A006364 Numbers k with an even number of trailing zeros in the binary representation of k!, A011371(k). - _Amiram Eldar_, Sep 05 2024 %D A006364 E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 111. %D A006364 R. K. Guy, Impartial games, pp. 35-55 of Combinatorial Games, ed. R. K. Guy, Proc. Sympos. Appl. Math., 43, Amer. Math. Soc., 1991. %D A006364 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006364 Reinhard Zumkeller, <a href="/A006364/b006364.txt">Table of n, a(n) for n = 1..10000</a> %H A006364 J.-P. Allouche and J. Shallit, <a href="https://doi.org/10.1016/S0304-3975(03)00090-2">The Ring of k-regular Sequences, II</a>, Theoret. Computer Sci., 307 (2003), 3-29. %H A006364 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>. %F A006364 Union of 2*A001969 and 2*A001969+1. With initial index 0: a(2n+1) = a(2n)+1, a(4n) = a(2n)+4n, a(4n+2) = -a(2n)+12n+6. - _Ralf Stephan_, Oct 17 2003 %F A006364 Conjecture: a(n) = 2*n + (-1)^(n-A000120(n-1)) - (3+(-1)^n)/2. - _Velin Yanev_, Dec 21 2016 %e A006364 G.f. = x + 6*x^2 + 7*x^3 + 10*x^4 + 11*x^5 + 12*x^6 + 13*x^7 + 18*x^8 + ... %t A006364 Select[Range[0,150],EvenQ[Count[Most[IntegerDigits[#,2]],1]]&] (* _Harvey P. Dale_, Nov 03 2011 *) %t A006364 a[ n_] := Which[ n < 1, 0, Mod[n, 2] > 0, a[n - 1] + 1, Mod[n, 4] > 0, 3 n - a[n/2 - 1], True, n + a[n/2]]; (* _Michael Somos_, Dec 21 2016 *) %o A006364 (PARI) a(n)=if(n<1,0,if(n%2==0,if(n%4==0,a(n/2)+n,-a((n-2)/2)+3*n),a(n-1)+1)) \\ _Ralf Stephan_ %o A006364 (PARI) is(n)=hammingweight(n>>1)%2==0 \\ _Charles R Greathouse IV_, Jun 19 2013 %o A006364 (Haskell) %o A006364 a006364 n = a006364_list %o A006364 a006364_list = filter (even . a000120. (`div` 2)) [0..] %o A006364 -- _Reinhard Zumkeller_, Oct 03 2011 %Y A006364 Cf. A000120, A001969, A011371. %K A006364 base,nonn,nice,easy %O A006364 1,3 %A A006364 _N. J. A. Sloane_