login
Number of palindromic primes in base 2 with exactly n binary digits.
3

%I #31 Sep 29 2023 11:51:57

%S 0,1,2,0,2,0,3,0,3,0,7,0,12,0,23,0,40,0,94,0,142,0,271,0,480,0,856,0,

%T 1721,0,3099,0,5572,0,10799,0,20782,0,39468,0,72672,0,139867,0,274480,

%U 0,520376,0,986318,0,1914097,0,3726617,0,7107443,0,13682325,0,26430797,0,51412565,0,99204128,0,190457946,0

%N Number of palindromic primes in base 2 with exactly n binary digits.

%C Every palindrome with an even number of digits is divisible by 11 (in base 2), i.e., by 3 in base 10, and therefore is composite (not prime). Hence there is only one palindromic prime with an even number of digits, namely 11_2 = 3_{10}.

%H Chai Wah Wu, <a href="/A117773/b117773.txt">Table of n, a(n) for n = 1..76</a>

%H Cécile Dartyge, Bruno Martin, Joël Rivat, Igor E. Shparlinski, and Cathy Swaenepoel, <a href="https://arxiv.org/abs/2309.11380">Reversible primes</a>, arXiv:2309.11380 [math.NT], 2023. See p. 34.

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

%t Array[If[And[OddQ[#], # > 1], 0, Count[Prime@ Range[PrimePi[2^#] - Boole[# == 1] + 1, PrimePi[2^(# + 1) - 1]], _?(PalindromeQ[IntegerDigits[#, 2]] &)]] &, 25, 0] (* _Michael De Vlieger_, Sep 29 2023 *)

%Y Cf. A016041, A117697, A095741.

%K nonn,base

%O 1,3

%A _Martin Renner_, Apr 15 2006

%E a(23)-a(40) from _Donovan Johnson_, Dec 02 2009

%E a(41)-a(66) from _Martin Raab_, Oct 20 2015