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.

A117697 Palindromic primes in base 2 (written in base 2).

This page as a plain text file.
%I A117697 #30 Feb 16 2025 08:33:00
%S A117697 11,101,111,10001,11111,1001001,1101011,1111111,100000001,100111001,
%T A117697 110111011,10010101001,10110101101,11000100011,11001010011,
%U A117697 11011111011,11100100111,11101010111,1001100011001,1001111111001,1010001000101
%N A117697 Palindromic primes in base 2 (written in base 2).
%H A117697 Attila Olah, <a href="/A117697/b117697.txt">Table of n, a(n) for n=1..43964</a>
%H A117697 Lubomira Dvorakova, Stanislav Kruml, and David Ryzak, <a href="https://arxiv.org/abs/2008.06864">Antipalindromic numbers</a>, arXiv:2008.06864 [math.CO], 2020. Mentions this sequence.
%H A117697 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Prime</a>.
%F A117697 a(n) = A007088(A016041(n)). - _R. J. Mathar_, Feb 25 2007
%p A117697 isA016041 := proc(n)
%p A117697     local bin,dig ;
%p A117697     if isprime(n) then
%p A117697         bin := convert(n,base,2) ;
%p A117697         for dig from 1 to nops(bin)/2 do
%p A117697             if op(dig,bin) <> op(-dig,bin) then
%p A117697                 return false;
%p A117697             end if;
%p A117697         end do ;
%p A117697         return true;
%p A117697     else
%p A117697         false ;
%p A117697     end if ;
%p A117697 end proc:
%p A117697 for i from 1 to 900 do p := ithprime(i) : if isA016041(p) then printf("%d, ",A007088(p)) ; fi ; od : # _R. J. Mathar_, Feb 25 2007
%t A117697 pal2Q[n_] := Reverse[x = IntegerDigits[n, 2]] == x; BaseForm[Select[Prime[Range[700]], pal2Q[#] &], 2] (* _Jayanta Basu_, Jun 24 2013 *)
%t A117697 FromDigits /@ Select[IntegerDigits[Prime@ Range[1000], 2], PalindromeQ] (* _Michael De Vlieger_, Oct 28 2020 *)
%Y A117697 Cf. A016041, A002385.
%K A117697 nonn,base
%O A117697 1,1
%A A117697 _Martin Renner_, Apr 13 2006