login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331895 Positive numbers k such that the binary and negabinary representations of k and the negabinary representation of -k are all palindromic. 1
1, 5, 7, 17, 21, 31, 65, 85, 127, 257, 273, 325, 341, 455, 511, 1025, 1105, 1285, 1365, 1799, 2047, 4097, 4161, 4369, 4433, 5125, 5189, 5397, 5461, 7175, 7967, 8191, 16385, 16705, 17425, 17745, 20485, 20805, 21525, 21845, 28679, 29127, 31775, 32767, 65537, 65793 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Numbers of the form 2^(2*m-1) - 1 (A083420) and 2^(2*m) + 1 (A052539) are terms.
LINKS
EXAMPLE
7 is a term since the binary representation of 7, 111, the negabinary representation of 7, 11011, and the negabinary representation of -7, 1001, are all palindromic.
MATHEMATICA
binPalinQ[n_] := PalindromeQ @ IntegerDigits[n, 2]; negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; nbPalinQ[n_] := And @@(PalindromeQ @ negabin[#] & /@ {n, -n}); Select[Range[2^16], binPalinQ[#] && nbPalinQ[#] &]
CROSSREFS
Intersection of A006995 and A331893.
Intersection of A331892 and A331894.
Sequence in context: A048700 A331892 A331893 * A164120 A342799 A043879
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jan 30 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 13:42 EDT 2024. Contains 371254 sequences. (Running on oeis4.)