cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A020467 Primes that contain digits 5 and 7 only.

This page as a plain text file.
%I A020467 #24 Jul 04 2025 11:17:57
%S A020467 5,7,557,577,757,5557,7577,7757,57557,75557,75577,77557,555557,575557,
%T A020467 575777,577757,757577,775757,775777,5555777,5557757,5575777,5577577,
%U A020467 5755577,5775557,5777557,7575577,7577777,55555777,55575757,55755757,55757777,57557557
%N A020467 Primes that contain digits 5 and 7 only.
%H A020467 Jason Bard, <a href="/A020467/b020467.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Vincenzo Librandi)
%t A020467 Flatten[Table[Select[FromDigits/@Tuples[{5,7},n],PrimeQ],{n,8}]]
%o A020467 (Magma) [p: p in PrimesUpTo(55755757 ) | Set(Intseq(p)) subset [5, 7]];// _Vincenzo Librandi_, Jul 27 2012
%o A020467 (Python)
%o A020467 from sympy import isprime
%o A020467 from sympy.utilities.iterables import multiset_permutations
%o A020467 def aupton(terms):
%o A020467   n, digits, alst = 0, 1, []
%o A020467   while len(alst) < terms:
%o A020467     mpstr = "".join(d*digits for d in "57")
%o A020467     for mp in multiset_permutations(mpstr, digits):
%o A020467       t = int("".join(mp))
%o A020467       if isprime(t): alst.append(t)
%o A020467       if len(alst) == terms: break
%o A020467     else: digits += 1
%o A020467   return alst
%o A020467 print(aupton(33)) # _Michael S. Branicky_, May 07 2021
%Y A020467 Subsequence of A030096, A260827-A260831, and A284380.
%K A020467 nonn,base
%O A020467 1,1
%A A020467 _David W. Wilson_