|
|
A342040
|
|
Binary palindromes of odd length.
|
|
2
|
|
|
1, 101, 111, 10001, 10101, 11011, 11111, 1000001, 1001001, 1010101, 1011101, 1100011, 1101011, 1110111, 1111111, 100000001, 100010001, 100101001, 100111001, 101000101, 101010101, 101101101, 101111101, 110000011, 110010011, 110101011
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[1] = 1; a[n_] := FromDigits[Join[#, {Mod[n, 2]}, Reverse[#]] &@ IntegerDigits[Floor[n/2], 2]]; Array[a, 26] (* Amiram Eldar, Apr 28 2021 *)
|
|
PROG
|
(Python)
s = bin(n)[2:]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|