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.

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

This page as a plain text file.
%I A128309 #18 Mar 09 2023 13:02:37
%S A128309 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 A128309 98,100,104,110,112,118,122,124,128,134,138,140,146,148,152,158,162,
%U A128309 164,168,174,176,182,186,188,194,196,200,206,208,214,218,220,224,230,234,236,242
%N A128309 a(n) = 2*A000069(n).
%C A128309 These are the even odious numbers. - _Tanya Khovanova_, May 15 2007
%H A128309 Charles R Greathouse IV, <a href="/A128309/b128309.txt">Table of n, a(n) for n = 1..10000</a>
%F A128309 a(n) = 4n + O(1). - _Charles R Greathouse IV_, Mar 22 2013
%t A128309 Select[Range[2,300,2],OddQ[DigitCount[#,2,1]]&] (* _Harvey P. Dale_, Oct 08 2017 *)
%o A128309 (PARI) is(n)=n%2==0 && hammingweight(n)%2 \\ _Charles R Greathouse IV_, Mar 22 2013
%o A128309 (PARI) a(n)=4*n-if(hammingweight(n-1)%2,4,2) \\ _Charles R Greathouse IV_, Mar 22 2013
%o A128309 (Python)
%o A128309 def A128309(n): return ((m:=n-1)<<1)+(m.bit_count()&1^1)<<1 # _Chai Wah Wu_, Mar 09 2023
%Y A128309 Different from A074202.
%Y A128309 Intersection of A000069 (odious numbers: odd number of 1's in binary expansion) and A005843 (even numbers).
%K A128309 nonn,easy
%O A128309 1,1
%A A128309 _N. J. A. Sloane_, May 10 2007