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.

A350988 Numbers k such that the k-th triangular number is a binary palindrome.

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 17, 21, 25, 33, 42, 65, 90, 129, 170, 257, 341, 357, 450, 513, 693, 893, 1025, 1365, 1397, 1445, 1617, 1670, 1750, 2049, 2730, 4097, 5418, 5985, 8193, 10397, 10922, 16385, 17313, 21717, 21845, 31749, 32769, 40637, 43605, 51537, 63482, 65537, 76217
Offset: 1

Views

Author

Amiram Eldar, Jan 28 2022

Keywords

Comments

This sequence is infinite since 2^k+1 is a term for all k>1 (Trigg, 1974).

Examples

			2 is a term since A000217(2) = 2*(2+1)/2 = 3 = 11_2 is a triangular number and also a binary palindromic number.
5 is a term since A000217(5) = 5*(5+1)/2 = 15 = 1111_2 is a triangular number and also a binary palindromic number.
		

Crossrefs

The binary version of A008509.
A000051 \ {3} is a subsequence.

Programs

  • Mathematica
    Select[Range[0, 10^5], PalindromeQ[IntegerDigits[#*(# + 1)/2, 2]] &]
  • PARI
    isok(k) = my(b=binary(k*(k+1)/2)); b == Vecrev(b); \\ Michel Marcus, Jan 28 2022
    
  • Python
    def ok(n): b = bin(n*(n+1)//2)[2:]; return b == b[::-1]
    print([k for k in range(80000) if ok(k)]) # Michael S. Branicky, Jan 28 2022

Formula

A000217(a(n)) = A350987(n).