A350988 Numbers k such that the k-th triangular number is a binary palindrome.
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
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..128
- Charles W. Trigg, Infinite sequences of palindromic triangular numbers, The Fibonacci Quarterly, Vol. 12, No. 2 (1974), pp. 209-212.
- Maciej Ulas, On certain diophantine equations related to triangular and tetrahedral numbers, arXiv:0811.2477 [math.NT], 2008.
Crossrefs
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
Comments