OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000 (first 1000 terms from Vincenzo Librandi)
James Maynard and Brady Haran, Primes without a 7, Numberphile video (2019).
MATHEMATICA
Flatten[Table[Select[FromDigits/@Tuples[{1, 4}, n], PrimeQ], {n, 8}]] (* Vincenzo Librandi, Jul 27 2012 *)
PROG
(Magma) [p: p in PrimesUpTo(14141411) | Set(Intseq(p)) subset [1, 4]]; // Bruno Berselli, Jul 27 2012
(Python)
from sympy import primerange
def checkd(a, c):
b = set(int(i) for i in set(str(a)))
return b.issubset(c)
for n in primerange(2, 2000000):
if checkd(n, [1, 4]):
print(n)
# Abhiram R Devesh, May 08 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved