cp's OEIS Frontend

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.

A276194 Odd numbers whose binary representation contains an even number of 1's and at least one 0.

This page as a plain text file.
%I A276194 #58 Jan 13 2019 03:09:29
%S A276194 5,9,17,23,27,29,33,39,43,45,51,53,57,65,71,75,77,83,85,89,95,99,101,
%T A276194 105,111,113,119,123,125,129,135,139,141,147,149,153,159,163,165,169,
%U A276194 175,177,183,187,189,195,197,201,207,209,215,219,221,225,231,235,237
%N A276194 Odd numbers whose binary representation contains an even number of 1's and at least one 0.
%H A276194 Lei Zhou, <a href="/A276194/b276194.txt">Table of n, a(n) for n = 1..10000</a>
%H A276194 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A276194 a(2^n - floor(n/2)) = 4*2^n + 1, for all n >= 0. - _Gheorghe Coserea_, Oct 24 2016
%e A276194 Binary expansions of odd integers in decimal and binary forms are as follows:
%e A276194    1 ->     1, no;
%e A276194    3 ->    11, no;
%e A276194    5 ->   101, yes, so a(1)=5;
%e A276194    7 ->   111, no;
%e A276194    9 ->  1001, yes so a(2)=9;
%e A276194   11 ->  1011, no;
%e A276194   13 ->  1101, no;
%e A276194   15 ->  1111, no;
%e A276194   17 -> 10001, yes so a(3)=17.
%t A276194 BNDigits[m_Integer] :=
%t A276194   Module[{n = m, d, t = {}},
%t A276194    While[n > 0, d = Mod[n, 2]; PrependTo[t, d]; n = (n - d)/2]; t];
%t A276194 c = 1;
%t A276194 Table[While[c = c + 2; d = BNDigits[c]; ld = Length[d];
%t A276194   c1 = Total[d]; ! (EvenQ[c1] && (c1 < ld))]; c, {n, 1, 57}]
%o A276194 (PARI) isok(n) = my(b=binary(n)); (n % 2) && (vecmin(b)==0) && !(vecsum(b) % 2); \\ _Michel Marcus_, Oct 21 2016
%o A276194 (PARI)
%o A276194 seq(N) = {
%o A276194   my(bag = List(), cnt = 0, n = 1);
%o A276194   while(cnt < N,
%o A276194         if (hammingweight(n)%2 == 0 && hammingweight(n+1) > 1,
%o A276194             listput(bag, n); cnt++);
%o A276194         n += 2);
%o A276194   return(Vec(bag));
%o A276194 };
%o A276194 seq(57)  \\ _Gheorghe Coserea_, Oct 25 2016
%Y A276194 Cf. A005408.
%Y A276194 Intersection of A129771 and A062289.
%K A276194 nonn,base
%O A276194 1,1
%A A276194 _Lei Zhou_, Oct 20 2016