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
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 10 2007
STATUS
approved