A231481 Primes whose base-6 representation is also the base-9 representation of a prime.
2, 3, 5, 13, 17, 29, 59, 67, 71, 73, 97, 127, 191, 199, 223, 227, 239, 307, 337, 349, 353, 367, 409, 421, 433, 449, 461, 479, 487, 491, 563, 571, 577, 619, 647, 683, 739, 743, 811, 823, 829, 857, 881, 911, 937, 941, 991, 1021, 1051, 1091, 1103, 1117, 1163, 1201, 1217, 1259, 1277, 1289
Offset: 1
Examples
13 = 21_6 and 21_9 = 19 are both prime, so 13 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[300]],PrimeQ[FromDigits[IntegerDigits[#,6],9]]&] (* Harvey P. Dale, Aug 30 2015 *)
-
PARI
is(p,b=9,c=6)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.
Comments