login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260827 Primes that contain only the digits (0, 5, 7). 5
5, 7, 557, 577, 757, 5077, 5507, 5557, 7057, 7507, 7577, 7757, 50077, 50707, 50777, 55057, 57077, 57557, 70507, 75557, 75577, 75707, 77557, 500057, 500777, 505777, 507077, 507557, 507757, 550007, 550577, 550757, 555077, 555557, 555707, 557057, 570077, 575077 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000

MATHEMATICA

Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {0, 5, 7}]=={} &]

PROG

(MAGMA) [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [0, 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 "057")

    for mp in multiset_permutations(mpstr, digits):

      if mp[0] == "0": continue

      t = int("".join(mp))

      if isprime(t): alst.append(t)

      if len(alst) == terms: break

    else: digits += 1

  return alst

print(aupton(38)) # Michael S. Branicky, May 07 2021

CROSSREFS

A020467 is a subsequence.

Cf. Primes that contain only the digits (k,5,7): this sequence (k=0), A260828 (k=1), A214705 (k=2), A087363 (k=3), A217039 (k=4), A260829 (k=6), A260830 (k=8), A260831 (k=9).

Cf. A000040.

Sequence in context: A176960 A114368 A260830 * A020467 A089344 A114363

Adjacent sequences:  A260824 A260825 A260826 * A260828 A260829 A260830

KEYWORD

nonn,easy,base,changed

AUTHOR

Vincenzo Librandi, Aug 01 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 09:53 EDT 2021. Contains 343821 sequences. (Running on oeis4.)