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.

A095741 Number of base-2 palindromic primes (A016041) in range [2^2n,2^(2n+1)].

This page as a plain text file.
%I A095741 #39 Apr 02 2023 15:04:00
%S A095741 2,2,3,3,7,12,23,40,94,142,271,480,856,1721,3099,5572,10799,20782,
%T A095741 39468,72672,139867,274480,520376,986318,1914097,3726617,7107443,
%U A095741 13682325,26430797,51412565,99204128,190457946,372035117,727434192,1407026351,2724590109,5315491839
%N A095741 Number of base-2 palindromic primes (A016041) in range [2^2n,2^(2n+1)].
%C A095741 Note that there are no such primes in any range ]2^(2n-1),2^2n], as all even-length binary palindromes are divisible by 3 (cf. A048702).
%C A095741 The ratio a(n)/A036378(2n) converges as follows: 1, 0.4, 0.230769, 0.069767, 0.051095, 0.025862, 0.014268, 0.007006, 0.00461, 0.00193, 0.00101, 0.000487, 0.000235, 0.000127, 0.000061, 0.000029
%H A095741 A. Karttunen, J. Moyer, <a href="/A095062/a095062.c.txt">C-program for computing the initial terms of this sequence</a>
%H A095741 <a href="/index/Pri#primesubsetpop2">Index entries for sequences related to occurrences of various subsets of primes in range ]2^n,2^(n+1)]</a>
%F A095741 a(n) = A117773(2*n+1). - _Chai Wah Wu_, Jul 05 2019
%t A095741 palindromicQ[n_, b_:10] := TrueQ[IntegerDigits[n, b] == Reverse[IntegerDigits[n, b]]]; Table[Length[Select[Range[2^(2n), 2^(2n + 1)], palindromicQ[#, 2] && PrimeQ[#] &]], {n, 10}] (* _Alonso del Arte_, Jan 13 2012 *)
%o A095741 (PARI) m=vector(65536);u=vector(#m);u[1]=1;for(b=1,#m-1,c=b;e=2^floor(log(b+.5)/log(2));d=0;u[b+1]=e;while(c>0,d=d+e*(c%2);c=floor(c/2);e=e/2);m[b+1]=d);for(x=0,31,h=0;y=2^x;for(w=y,2*y-1,if(x<16,v1=4*y*w+m[w+1];v2=v1+2*y,w1=floor(w/65536);w2=w-65536*w1;v1=262144*y*w1+4*y*w2+65536*u[w1+1]/u[w2+1]*m[w2+1]+m[w1+1];v2=v1+2*y);if(isprime(v1),h++);if(isprime(v2),h++));print(2*x+3" bits: "h)) \\ _Martin Raab_, Jan 13 2012
%Y A095741 Bisection of the first diagonal of triangle A095759.
%Y A095741 Cf. A095731, A117773.
%K A095741 nonn,base
%O A095741 1,1
%A A095741 _Antti Karttunen_, Jun 12 2004
%E A095741 a(27)-a(32) from _Martin Raab_, Oct 20 2015
%E A095741 a(33)-a(35) from _Chai Wah Wu_, Jul 05 2019
%E A095741 a(36)-a(37) from _Chai Wah Wu_, Jul 11 2019