|
|
A236512
|
|
Primes whose representation in base (2), base (3), base (4) and base (5) are also prime when read in decimal.
|
|
2
|
|
|
9241, 85303, 110581, 296011, 331081, 465523, 644353, 659371, 849943, 1108993, 1116163, 1210483, 2149471, 2469241, 2963923, 3409753, 3704203, 4451071, 4774801, 4978003, 5665213, 5674993, 5995021, 6507343, 6817501, 7529941, 7596373, 7693531, 7973653, 8320831, 8344681
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
9241 is in the sequence because it is prime. Its representation in base (2):{10010000011001}, base (3):{110200021}, base (4):{2100121} and base (5):{243431}, when read in decimal are also prime.
|
|
MATHEMATICA
|
t={}; n=1; While[Length[t]<100, n=NextPrime[n]; If[PrimeQ[FromDigits[IntegerDigits[n, 2]]]&&PrimeQ[FromDigits[IntegerDigits[n, 3]]] &&PrimeQ[FromDigits[IntegerDigits[n, 4]]]&&PrimeQ[FromDigits[IntegerDigits[n, 5]]], ApendTo[t, n]]] t (*K. D. Bajpai*)
|
|
PROG
|
(PARI)
default(primelimit, 2^31)
base_b(n, b) = {
my(s=[], r, x=10);
while(n>0,
r = n%b;
n = n\b;
s = concat(r, s)
);
eval(Pol(s))
}
forprime(p=2, maxp,
if(isprime(base_b(p, 2)) &&
isprime(base_b(p, 3)) &&
isprime(base_b(p, 4)) &&
isprime(base_b(p, 5)), print1(p, ", ")
)
)
}
|
|
CROSSREFS
|
Cf. A000040 (prime numbers), A065720 (primes: binary representation is also prime),
A236365 (primes: binary and octal representation is also prime).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|