login
A350987
Triangular numbers that are binary palindromes.
7
0, 1, 3, 15, 21, 45, 153, 231, 325, 561, 903, 2145, 4095, 8385, 14535, 33153, 58311, 63903, 101475, 131841, 240471, 399171, 525825, 932295, 976503, 1044735, 1308153, 1395285, 1532125, 2100225, 3727815, 8394753, 14680071, 17913105, 33566721, 54054003, 59650503
OFFSET
1,3
COMMENTS
This sequence is infinite since (2^k+1)*(2^k+2)/2 = A000217(A028401(k)) is a term for all k>1 (Trigg, 1974).
LINKS
Charles W. Trigg, Infinite sequences of palindromic triangular numbers, The Fibonacci Quarterly, Vol. 12, No. 2 (1974), pp. 209-212.
FORMULA
a(n) = A000217(A350988(n)).
EXAMPLE
3 is a term since 3 = A000217(2) = 2*(2+1)/2 is a triangular number, and 3 = 11_2 is also a binary palindromic number.
15 is a term since 15 = A000217(5) = 5*(5+1)/2 is a triangular number, and 15 = 1111_2 is also a binary palindromic number.
MATHEMATICA
t[n_] := n*(n + 1)/2; Select[t /@ Range[0, 2*10^4], PalindromeQ[IntegerDigits[#, 2]] &]
PROG
(Python)
from itertools import count, islice
def agen():
for i in count(0):
t = i*(i+1)//2
b = bin(t)[2:]
if b == b[::-1]:
yield t
print(list(islice(agen(), 37))) # Michael S. Branicky, Jan 28 2022
CROSSREFS
Intersection of A000217 and A006995.
The binary version of A003098.
A028401 \ {6} is a subsequence.
Sequence in context: A147025 A147017 A171570 * A076825 A259745 A118565
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jan 28 2022
STATUS
approved