login
Union of even odious (cf. A128309) and evil numbers (cf. A001969).
6

%I #10 Dec 15 2018 11:49:31

%S 0,2,3,4,5,6,8,9,10,12,14,15,16,17,18,20,22,23,24,26,27,28,29,30,32,

%T 33,34,36,38,39,40,42,43,44,45,46,48,50,51,52,53,54,56,57,58,60,62,63,

%U 64,65,66,68,70,71,72,74,75,76,77,78,80,82,83,84,85,86,88

%N Union of even odious (cf. A128309) and evil numbers (cf. A001969).

%C Apart from initial zero: numbers m, such that when mergesorting lists of length m, the maximal number of comparisons is odd: A003071(a(n+1)) = A230721(n).

%H Reinhard Zumkeller, <a href="/A230709/b230709.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/So#sorting">Index entries for sequences related to sorting</a>

%F A010060(a(n)) * a(n) mod 2 = 0.

%t Complement[Range[0, m = 88], Select[Range[1, m, 2], OddQ[ Total[ IntegerDigits[#, 2]]]&]] (* _Jean-François Alcover_, Dec 15 2018 *)

%o (Haskell)

%o a230709 n = a230709_list !! (n-1)

%o a230709_list = filter (\x -> a010060 x * x `mod` 2 == 0) [0..]

%o (PARI) is(n)=if(hammingweight(n)%2,n%2==0,1) \\ _Charles R Greathouse IV_, May 09 2016

%Y Cf. A092246 (complement).

%K nonn,easy

%O 1,2

%A _Reinhard Zumkeller_, Oct 28 2013