|
|
A350988
|
|
Numbers k such that the k-th triangular number is a binary palindrome.
|
|
3
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
This sequence is infinite since 2^k+1 is a term for all k>1 (Trigg, 1974).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
Select[Range[0, 10^5], PalindromeQ[IntegerDigits[#*(# + 1)/2, 2]] &]
|
|
PROG
|
(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]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|