A128309 a(n) = 2*A000069(n).
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
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[Range[2,300,2],OddQ[DigitCount[#,2,1]]&] (* Harvey P. Dale, Oct 08 2017 *)
-
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
Formula
a(n) = 4n + O(1). - Charles R Greathouse IV, Mar 22 2013
Comments