A235474 Primes whose base-4 representation is also the base-5 representation of a prime.
2, 3, 11, 29, 31, 41, 101, 109, 139, 149, 151, 181, 199, 229, 239, 251, 269, 271, 281, 389, 409, 491, 509, 541, 547, 661, 751, 887, 911, 947, 991, 1021, 1051, 1061, 1069, 1091, 1151, 1279, 1289, 1381, 1409, 1471, 1549, 1709, 1759, 1801, 1999
Offset: 1
Examples
11 = 23_4 and 23_5 = 13 are both prime, so 11 is a term.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- M. F. Hasler, Primes whose base c expansion is also the base b expansion of a prime
Crossrefs
Programs
-
Mathematica
Select[Prime[Range[400]],PrimeQ[FromDigits[IntegerDigits[#,4],5]]&] (* Harvey P. Dale, Dec 31 2017 *)
-
PARI
is(p,b=5,c=4)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.
Comments