login
Evil cubes.
1

%I #14 Dec 09 2019 09:20:38

%S 0,27,125,216,343,729,1000,1331,1728,2744,3375,4913,5832,6859,8000,

%T 9261,10648,13824,19683,21952,27000,29791,35937,39304,46656,50653,

%U 54872,59319,64000,68921,74088,85184,103823,110592,148877,157464,166375

%N Evil cubes.

%H Amiram Eldar, <a href="/A125497/b125497.txt">Table of n, a(n) for n = 1..10000</a>

%e 125 is in the sequence because 5^3 = 125 and its representation in base 2 (1111101) has an even number of 1's.

%p a:=proc(k) local k2: k2:=convert(k^3,base,2): if add(k2[j],j=1..nops(k2)) mod 2=0 then k^3 else fi end: seq(a(k),k=1..70); # _Emeric Deutsch_, Jan 01 2007

%p isA001969 := proc(n) local b2 ; b2 := convert(n,base,2) ; if sum(op(i,b2),i=1..nops(b2)) mod 2 = 0 then RETURN(true) ; else RETURN(false) ; fi ; end : for n from 1 to 80 do if isA001969(n^3) then printf("%d,",n^3) ; fi ; od ; # _R. J. Mathar_, Jan 07 2007

%t Select[Range[0, 55]^3, EvenQ @ DigitCount[#, 2][[1]] &] (* _Amiram Eldar_, Dec 09 2019 *)

%Y Intersection of A000578 (cubes) and A001969 (evil numbers).

%K base,nonn

%O 1,2

%A _Tanya Khovanova_, Dec 27 2006

%E More terms from _Emeric Deutsch_, Jan 01 2007

%E More terms from _R. J. Mathar_, Jan 07 2007

%E a(1) = 0 inserted by _Amiram Eldar_, Dec 09 2019