login
Evil numbers (A001969) multiplied by 2.
6

%I #8 Jun 14 2017 14:53:54

%S 0,6,10,12,18,20,24,30,34,36,40,46,48,54,58,60,66,68,72,78,80,86,90,

%T 92,96,102,106,108,114,116,120,126,130,132,136,142,144,150,154,156,

%U 160,166,170,172,178,180,184,190,192,198,202,204,210,212,216,222,226,228,232,238

%N Evil numbers (A001969) multiplied by 2.

%C Numbers n such that the Maple command genpoly(n,2,t) outputs a polynomial in F_2[t] that is divisible by t(t+1), where F_2 is the finite field with two elements. E.g. a(2)=10 since the polynomial genpoly(10,2,t)=t^3+t = t(t+1)(t+1) in F_2[t] is divisible by the polynomial t(t+1) in F_2[t]

%C These are the even evil numbers: the intersection of A001968 and A005843. - _Tanya Khovanova_, May 04 2007

%t 2*Select[Range[0,120],EvenQ[DigitCount[#,2,1]]&] (* _Harvey P. Dale_, Jun 14 2017 *)

%o (PARI) is(n)=n%2==0 && hammingweight(n)%2==0 \\ _Charles R Greathouse IV_, Mar 22 2013

%o (PARI) a(n)=4*n--+hammingweight(n)%2*2 \\ _Charles R Greathouse IV_, Mar 22 2013

%K nonn,easy

%O 1,2

%A _Luis H. Gallardo_ and Johan Huisman, Jan 07 2007