OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jan 30 2020
STATUS
approved