login
A153168
Primes p with property that 6p+1 is prime and uses only digits 2 and 3.
1
37, 5387, 537037, 37220537, 38870537, 3703870537, 5555555387, 55538720387, 370553872037, 370555370387, 372203887037, 387037038887, 387203705387, 388887053887, 537203703887, 538705553887, 538722205537, 538870538887, 553703722037, 553720538887
OFFSET
1,1
LINKS
Bill Hannaford and Harvey P. Dale, Table of n, a(n) for n = 1..1500 (first 40 terms from Bill Hannaford).
MATHEMATICA
(#-1)/6&/@Select[Flatten[Table[FromDigits/@Tuples[{2, 3}, n], {n, 13}]], AllTrue[ {#, (#-1)/6}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 15 2015 *)
PROG
(PARI) okdig(n) = {digs = Set(digits(n)); (#digs == 2) && (digs[1] == 2) && (digs[2] == 3); }
lista(nn) = {p = 2; until (p > nn, if (isprime(q=6*p+1) && okdig(q), print1(p, ", ")); p = nextprime(p+1); ); } \\ Michel Marcus, Oct 15 2013
CROSSREFS
Cf. A153166 Numbers n with property that 6n+1 is prime and uses only digits 2 and 3.
Sequence in context: A232302 A363871 A153166 * A195215 A183481 A295415
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Dec 20 2008
EXTENSIONS
a(6)-a(40) from Bill Hannaford, Nov 08 2013
STATUS
approved