login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260828 Primes that contain only the digits (1, 5, 7). 3
5, 7, 11, 17, 71, 151, 157, 557, 571, 577, 751, 757, 1117, 1151, 1171, 1511, 1571, 1777, 5171, 5557, 5711, 5717, 7151, 7177, 7517, 7577, 7717, 7757, 11117, 11171, 11177, 11551, 11717, 11777, 15511, 15551, 17117, 17551, 51151, 51157, 51511, 51517, 51551, 51577 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
James Maynard and Brady Haran, Primes without a 7, Numberphile video (2019)
MATHEMATICA
Select[Prime[Range[2 10^4]], Complement[IntegerDigits[#], {1, 5, 7}] == {} &]
PROG
(Magma) [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [1, 5, 7]];
(Python)
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations
def aupton(terms):
n, digits, alst = 0, 1, []
while len(alst) < terms:
mpstr = "".join(d*digits for d in "157")
for mp in multiset_permutations(mpstr, digits):
t = int("".join(mp))
if isprime(t): alst.append(t)
if len(alst) == terms: break
else: digits += 1
return alst
print(aupton(44)) # Michael S. Branicky, May 07 2021
CROSSREFS
A020453, A020455 and A020467 are subsequences.
Subsequence of A030096.
Cf. similar sequences listed in A260827.
Cf. A000040.
Sequence in context: A134572 A106954 A027755 * A280651 A089785 A226383
KEYWORD
nonn,easy,base
AUTHOR
Vincenzo Librandi, Aug 02 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)