A163170 Odd composite integers that are palindromes when written in binary.
9, 15, 21, 27, 33, 45, 51, 63, 65, 85, 93, 99, 119, 129, 153, 165, 189, 195, 219, 231, 255, 273, 297, 325, 341, 365, 381, 387, 403, 427, 455, 471, 495, 511, 513, 561, 585, 633, 645, 693, 717, 765, 771, 819, 843, 891, 903, 951, 975, 1023, 1025, 1057, 1105, 1137
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A016041.
Programs
-
Maple
rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: a := proc (n) local n2: n2 := convert(n, binary): if 1 < n and `mod`(n, 2) = 1 and isprime(n) = false and rev(n2) = n2 then n else end if end proc: seq(a(n), n = 1 .. 1500); # Emeric Deutsch, Jul 24 2009
-
Mathematica
Select[Range[1,1201,2],CompositeQ[#]&&IntegerDigits[#,2]==Reverse[IntegerDigits[#,2]]&] (* Harvey P. Dale, Dec 28 2024 *)
Extensions
Extended by Emeric Deutsch, Jul 24 2009