A166936 Positive integers n such that when they are written in binary, the longest palindromic substring (or at least one of which that is tied for longest) in binary n begins and ends with a 0.
2, 4, 8, 10, 12, 16, 20, 22, 24, 26, 32, 36, 38, 40, 42, 44, 46, 48, 52, 56, 58, 64, 68, 72, 74, 76, 77, 78, 80, 82, 84, 88, 89, 92, 94, 96, 100, 104, 106, 110, 112, 116, 128, 136, 137, 138, 140, 142, 144, 145, 148, 149, 150, 152, 154, 156, 157, 158, 160, 162, 164
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
lps0Q[n_]:=Module[{ss=Select[Subsequences[IntegerDigits[n,2]],#==Reverse[#]&],len},len=Max[Length/@ss];AnyTrue[Select[ss,Length[#]==len&],#[[1]]==0&]]; Select[Range[200],lps0Q] (* Harvey P. Dale, Apr 27 2025 *)
Extensions
Extended by Ray Chandler, Mar 11 2010