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.

A056709 Naught-y primes, primes with noughts (or zeros).

Original entry on oeis.org

101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1201, 1301, 1303, 1307, 1409, 1601, 1607, 1609, 1709, 1801, 1901, 1907
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Intersection of A000040 and A011540. - Michel Marcus, Mar 12 2015

Crossrefs

Cf. A000040 (primes), A011540 (numbers that contain a 0).
Complement, in A000040, of zeroless primes A038618.
Cf. A164968 (Naughty primes: most digits are 0).

Programs

  • Magma
    [p:p in PrimesUpTo(2000)|0 in Intseq(p)]; // Marius A. Burtea, Jan 13 2020
    
  • Mathematica
    Select[ Range[ 1, 2500, 2 ], PrimeQ[ # ] && Sort[ RealDigits[ # ][ [ 1 ] ] ][ [ 1 ] ] == 0 & ]
    (* Second program: *)
    Select[Prime@ Range@ 300, DigitCount[#, 10, 0] > 0 &] (* Michael De Vlieger, Jan 28 2020 *)
  • PARI
    is(n)=isprime(n)&&vecsort(eval(Vec(Str(n))),,8)[1]==0
    
  • PARI
    select( {is_A056709(n)=!vecmin(digits(n))&&isprime(n)}, [1..2000]) \\ Defines the characteristic function is_A; as check & example: select terms in [1..2000].
    next_A056709(n)={until(!vecmin(digits(n)), n=nextprime(n+1));n} \\ Successor function: find smallest a(k) > n. Useful to get a vector of consecutive terms:
    A056709_vec(n,M=99)=M--;vector(n,i,M=next_A056709(M)) \\ get n terms >= M (if given, else start with a(1)).  \\ M. F. Hasler, Jan 12 2020
    
  • Python
    from sympy import primerange
    def aupto(lim): return [p for p in primerange(1, lim+1) if '0' in str(p)]
    print(aupto(1910)) # Michael S. Branicky, Mar 11 2022

Formula

a(n) ~ n log n: almost all primes are in this sequence. - Charles R Greathouse IV, Jul 24 2012