%I #16 Jul 17 2014 22:34:31
%S 0,1,1,2,0,2,5,11,6,28,39,57,96,163,324,486,967,1493,2915,5083,9343,
%T 16836,31877,55587,105785,189879,357614,664588,1257356,2254304,
%U 4303412,8113964,15259583,28364673
%N Number of primes whose binary representation has length n and which translates ('inter-base translation') to ternary as a prime.
%e The only binary 5-digit (-bit) primes are decimal 17, 19, 23, 29 and 31; and reading the binary representations of these as base-3 representations instead produces numbers whose decimal representations are 82, 85, 94, 118 and 121. None of these 5 numbers are prime, so a(5)=0.
%o (PARI)
%o {
%o i=1;while(1,
%o z=0;forprime(p=2^(i-1),2^i-1,
%o b=binary(p);u=0;for(j=1,i,
%o if(b[j],u+=3^(i-j)));if(isprime(u),z++));
%o print1(z", ");i++)
%o }
%Y Cf. A235266.
%K nonn,base
%O 1,4
%A _James G. Merickel_, May 31 2014