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.

A342040 Binary palindromes of odd length.

This page as a plain text file.
%I A342040 #19 Apr 28 2021 02:05:26
%S A342040 1,101,111,10001,10101,11011,11111,1000001,1001001,1010101,1011101,
%T A342040 1100011,1101011,1110111,1111111,100000001,100010001,100101001,
%U A342040 100111001,101000101,101010101,101101101,101111101,110000011,110010011,110101011
%N A342040 Binary palindromes of odd length.
%C A342040 Subsequence of A057148.
%F A342040 a(n) = A007088(A048700(n)).
%t A342040 a[1] = 1; a[n_] := FromDigits[Join[#, {Mod[n, 2]}, Reverse[#]] &@ IntegerDigits[Floor[n/2], 2]]; Array[a, 26] (* _Amiram Eldar_, Apr 28 2021 *)
%o A342040 (Python)
%o A342040 def A342040(n):
%o A342040     s = bin(n)[2:]
%o A342040     return int(s+s[-2::-1]) # _Chai Wah Wu_, Feb 26 2021
%Y A342040 Cf. A006995, A007088, A048700, A057148, A070939, A305989, A342036.
%K A342040 nonn,base,easy
%O A342040 1,2
%A A342040 _Seiichi Manyama_, Feb 26 2021