A235478 Primes whose base-2 representation also is the base-8 representation of a prime.
7, 11, 13, 29, 37, 43, 47, 53, 61, 67, 71, 73, 107, 139, 149, 199, 211, 227, 263, 293, 307, 311, 317, 331, 347, 383, 389, 421, 461, 467, 541, 593, 601, 619, 641, 643, 739, 811, 863, 907, 937, 1061, 1069, 1093, 1117, 1163, 1223, 1283, 1301, 1319, 1321, 1409, 1433, 1439, 1489, 1499, 1523, 1559, 1619, 1697, 1811, 1861, 1879
Offset: 1
Examples
11 = 1011_2 and 1011_8 = 521 are both prime, so 11 is a term.
Links
- Robert Price, Table of n, a(n) for n = 1..2265
- M. F. Hasler, Primes whose base c expansion is also the base b expansion of a prime
Crossrefs
Programs
-
Mathematica
Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,2],8]]&] (* Harvey P. Dale, Sep 25 2015 *)
-
PARI
is(p,b=8)=isprime(vector(#d=binary(p),i,b^(#d-i))*d~)&&isprime(p)
Comments