cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A331892 Positive numbers k such that the negabinary expansion (A039724) of -k is palindromic.

Original entry on oeis.org

1, 5, 7, 17, 21, 31, 35, 57, 65, 85, 93, 119, 127, 147, 155, 201, 217, 257, 273, 325, 341, 381, 397, 455, 471, 511, 527, 579, 595, 635, 651, 745, 777, 857, 889, 993, 1025, 1105, 1137, 1253, 1285, 1365, 1397, 1501, 1533, 1613, 1645, 1767, 1799, 1879, 1911, 2015
Offset: 1

Views

Author

Amiram Eldar, Jan 30 2020

Keywords

Comments

Numbers of the form 2^(2*m-1) - 1 (A083420) and 2^(2*m) + 1 (A052539) are terms.

Examples

			5 is a term since the negabinary representation of -5 is 1111 which is palindromic.
		

Crossrefs

Programs

  • Mathematica
    negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; Select[Range[2000], PalindromeQ @ negabin[-#] &]