login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128309 a(n) = 2*A000069(n). 10
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)