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

A128309
a(n) = 2*A000069(n).
11
2, 4, 8, 14, 16, 22, 26, 28, 32, 38, 42, 44, 50, 52, 56, 62, 64, 70, 74, 76, 82, 84, 88, 94, 98, 100, 104, 110, 112, 118, 122, 124, 128, 134, 138, 140, 146, 148, 152, 158, 162, 164, 168, 174, 176, 182, 186, 188, 194, 196, 200, 206, 208, 214, 218, 220, 224, 230, 234, 236, 242
OFFSET
1,1
COMMENTS
These are the even odious numbers. - Tanya Khovanova, May 15 2007
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 4n + O(1). - Charles R Greathouse IV, Mar 22 2013
MATHEMATICA
Select[Range[2, 300, 2], OddQ[DigitCount[#, 2, 1]]&] (* Harvey P. Dale, Oct 08 2017 *)
PROG
(PARI) is(n)=n%2==0 && hammingweight(n)%2 \\ Charles R Greathouse IV, Mar 22 2013
(PARI) a(n)=4*n-if(hammingweight(n-1)%2, 4, 2) \\ Charles R Greathouse IV, Mar 22 2013
(Python)
def A128309(n): return ((m:=n-1)<<1)+(m.bit_count()&1^1)<<1 # Chai Wah Wu, Mar 09 2023
CROSSREFS
Different from A074202.
Intersection of A000069 (odious numbers: odd number of 1's in binary expansion) and A005843 (even numbers).
Sequence in context: A370840 A049133 A063033 * A074202 A086303 A209838
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 10 2007
STATUS
approved