login

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”).

a(n) = 2*A000069(n).
11

%I #18 Mar 09 2023 13:02:37

%S 2,4,8,14,16,22,26,28,32,38,42,44,50,52,56,62,64,70,74,76,82,84,88,94,

%T 98,100,104,110,112,118,122,124,128,134,138,140,146,148,152,158,162,

%U 164,168,174,176,182,186,188,194,196,200,206,208,214,218,220,224,230,234,236,242

%N a(n) = 2*A000069(n).

%C These are the even odious numbers. - _Tanya Khovanova_, May 15 2007

%H Charles R Greathouse IV, <a href="/A128309/b128309.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 4n + O(1). - _Charles R Greathouse IV_, Mar 22 2013

%t Select[Range[2,300,2],OddQ[DigitCount[#,2,1]]&] (* _Harvey P. Dale_, Oct 08 2017 *)

%o (PARI) is(n)=n%2==0 && hammingweight(n)%2 \\ _Charles R Greathouse IV_, Mar 22 2013

%o (PARI) a(n)=4*n-if(hammingweight(n-1)%2,4,2) \\ _Charles R Greathouse IV_, Mar 22 2013

%o (Python)

%o def A128309(n): return ((m:=n-1)<<1)+(m.bit_count()&1^1)<<1 # _Chai Wah Wu_, Mar 09 2023

%Y Different from A074202.

%Y Intersection of A000069 (odious numbers: odd number of 1's in binary expansion) and A005843 (even numbers).

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_, May 10 2007