# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a091017 Showing 1-1 of 1 %I A091017 #18 Apr 08 2023 10:09:52 %S A091017 15,17,27,29,30,34,36,43,45,51,54,57,58,60,63,68,71,72,75,85,86,90,92, %T A091017 102,108,113,114,126,129,132,135,139,144,147,150,159,165,170,175,177, %U A091017 192,195,197,198,201,204,210,216,219,226,228,231,237,264,270,288,291 %N A091017 Nonpalindromic integers which have an even number of ones in binary and whose reverse does as well. %H A091017 Robert Israel, Table of n, a(n) for n = 1..10000 %e A091017 15 is a term because 15_10 = 1111_2 has 4 1's and 51_10 = 110011_2 also has 4 1's. %p A091017 filter:= proc(n) local L,r,j; %p A091017 L:= convert(n,base,10); %p A091017 r:= add(L[-j]*10^(j-1),j=1..nops(L)); %p A091017 r <> n and convert(convert(n,base,2),`+`)::even and convert(convert(r,base,2),`+`)::even %p A091017 end proc: %p A091017 select(filter, [$1..1000]); # _Robert Israel_, May 11 2021 %t A091017 Reveral[n_] := FromDigits[ Reverse[ IntegerDigits[ n]]]; Select[ Range[ 296], Reveral[ # ] != # && EvenQ[ Count[ IntegerDigits[ #, 2], 1]] && EvenQ[ Count[ IntegerDigits[ Reveral[ # ], 2], 1]] &] (* _Robert G. Wilson v_, Feb 26 2004 *) %t A091017 npeoQ[n_]:=!PalindromeQ[n]&&AllTrue[{DigitCount[n,2,1],DigitCount[ IntegerReverse[ n],2,1]},EvenQ]; Select[Range[300],npeoQ] (* _Harvey P. Dale_, Apr 08 2023 *) %Y A091017 Cf. A006567, A001969, A000040. %K A091017 easy,nonn,base %O A091017 1,1 %A A091017 _Michael Joseph Halm_, Feb 25 2004 %E A091017 Edited, corrected and extended by _Robert G. Wilson v_, Feb 26 2004 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE