|
|
A020469
|
|
Primes that contain digits 6 and 7 only.
|
|
8
|
|
|
7, 67, 677, 67777, 76667, 76777, 666667, 677767, 767677, 777677, 6676667, 6676777, 6677677, 6677767, 6677777, 6766667, 6766777, 6776677, 7666667, 7667677, 7667767, 7766767, 7766777, 7777667, 66666667, 66677777, 66776777, 67667777, 67766767, 67776677, 67776767
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
Flatten[Table[Select[FromDigits/@Tuples[{6, 7}, n], PrimeQ], {n, 8}]] (* Vincenzo Librandi, Jul 27 2012 *)
|
|
PROG
|
(Python)
from sympy import isprime
from itertools import count, islice, product
def agen(): # generator of terms
yield 7
for d in count(2):
for first in product("67", repeat=d-1):
t = int("".join(first) + "7")
if isprime(t): yield t
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|