A092570 Primes p which become a prime q under transformation of inner bits of binary representation in A092569. In binary representation of p, transformation of inner bits, 1 <-> 0, gives binary representation of q.
2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 37, 43, 53, 59, 79, 83, 89, 103, 109, 113, 151, 157, 173, 191, 193, 211, 227, 233, 269, 277, 281, 307, 311, 337, 347, 349, 359, 367, 379, 389, 401, 409, 419, 421, 431, 457, 461, 487, 491, 499, 523, 569, 599, 607, 617, 653, 659
Offset: 1
Examples
307 and 461 are terms because 307_10 = 100110011_2, transformation of inner bits gives 100110011_2 -> 111001101_2 = 461_10.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A092569.
Programs
-
Mathematica
ptibQ[n_]:=Module[{id=IntegerDigits[n,2],f,l,r},f=id[[1]];l=id[[-1]];r=Most[Rest[id]];PrimeQ[FromDigits[Join[{f},r/.{1->0,0->1},{l}],2]]]; Select[Prime[Range[200]],ptibQ] (* Harvey P. Dale, Jul 16 2025 *)
-
PARI
T(p)={pow2=2;v=binary(p);L=#v-1;forstep(k=L,2,-1,if(v[k],p-=pow2,p+=pow2);pow2*=2);return(p)}; forprime(p=2,659,if(isprime(T(p)),print1(p,", "))) \\ Washington Bomfim, Jan 18 2011