A235481 Primes whose base-4 representation is also the base-9 representation of a prime.
2, 3, 29, 41, 61, 89, 109, 149, 157, 281, 293, 313, 401, 421, 433, 593, 701, 709, 1013, 1049, 1061, 1069, 1097, 1117, 1277, 1289, 1301, 1553, 1601, 1709, 2069, 2137, 2237, 2309, 2377, 2437, 2477, 2689, 2729, 2749, 2797, 2957, 2969, 3001, 3061, 3109, 3169, 3329, 3361, 3389, 3457, 3533, 3701
Offset: 1
Examples
29 = 131_4 and 131_9 = 109 are both prime, so 29 is a term.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
- M. F. Hasler, Primes whose base c expansion is also the base b expansion of a prime
Crossrefs
Programs
-
Mathematica
Select[Prime@Range@600, PrimeQ[FromDigits[IntegerDigits[#, 4], 9]] &] (* Giovanni Resta, Sep 12 2019 *)
-
PARI
is(p,b=9,c=4)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.
Comments