login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117697 Palindromic primes in base 2 (written in base 2). 9

%I #29 Oct 28 2020 21:19:52

%S 11,101,111,10001,11111,1001001,1101011,1111111,100000001,100111001,

%T 110111011,10010101001,10110101101,11000100011,11001010011,

%U 11011111011,11100100111,11101010111,1001100011001,1001111111001,1010001000101

%N Palindromic primes in base 2 (written in base 2).

%H Attila Olah, <a href="/A117697/b117697.txt">Table of n, a(n) for n=1..43964</a>

%H 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 Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Prime</a>.

%F a(n) = A007088(A016041(n)). - _R. J. Mathar_, Feb 25 2007

%p isA016041 := proc(n)

%p local bin,dig ;

%p if isprime(n) then

%p bin := convert(n,base,2) ;

%p for dig from 1 to nops(bin)/2 do

%p if op(dig,bin) <> op(-dig,bin) then

%p return false;

%p end if;

%p end do ;

%p return true;

%p else

%p false ;

%p end if ;

%p end proc:

%p 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 pal2Q[n_] := Reverse[x = IntegerDigits[n, 2]] == x; BaseForm[Select[Prime[Range[700]], pal2Q[#] &], 2] (* _Jayanta Basu_, Jun 24 2013 *)

%t FromDigits /@ Select[IntegerDigits[Prime@ Range[1000], 2], PalindromeQ] (* _Michael De Vlieger_, Oct 28 2020 *)

%Y Cf. A016041, A002385.

%K nonn,base

%O 1,1

%A _Martin Renner_, Apr 13 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)