OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..2115
EXAMPLE
157 is prime and appears in the sequence. Its representation in binary = 10011101 and in ternary = 12211 are also prime when read in decimal.
313 is prime and appears in the sequence. Its representation in binary = 100111001 and in ternary = 102121 are also prime when read in decimal.
MATHEMATICA
t={}; n=1; While[Length[t] < 50, n=NextPrime[n]; If[PrimeQ[FromDigits[IntegerDigits[n, 2]]] && PrimeQ[FromDigits[IntegerDigits[n, 3]]], AppendTo[t, n]]]; t
PROG
(PARI) 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))
s=[]; forprime(p=2, 40000, if(isprime(base_b(p, 2)) && isprime(base_b(p, 3)), s=concat(s, p))); s \\ Colin Barker, Jan 28 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jan 28 2014
STATUS
approved