A235634 Primes whose base-4 representation is also the base-7 representation of a prime.
2, 3, 11, 23, 29, 31, 41, 71, 79, 101, 109, 113, 137, 149, 157, 163, 191, 199, 239, 251, 263, 269, 283, 307, 353, 397, 401, 431, 443, 521, 547, 601, 701, 709, 743, 751, 773, 853, 887, 941, 947, 983, 1013, 1039, 1049, 1069, 1109, 1151, 1217, 1283, 1303, 1487, 1489, 1663, 1669, 1789, 1823, 1901, 1949, 1973
Offset: 1
Examples
E.g., 11 = 23_4 and 23_7 = 17 both are prime.
Links
- Robert Israel, 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
-
Maple
filter:= proc(n) local L,m; if not isprime(n) then return false fi; L:= convert(n,base,4); isprime(add(L[i]*7^(i-1),i=1..nops(L))); end proc: select(filter, [2,seq(i,i=3..10000,2)]); # Robert Israel, Jul 02 2018
-
PARI
is(p,b=7,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