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.

Showing 1-10 of 27 results. Next

A089769 Duplicate of A033274.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 41, 61, 89, 101, 109, 149, 181, 401, 409, 449, 491, 499, 601, 691, 809
Offset: 1

Views

Author

Keywords

A034844 Primes with only nonprime decimal digits.

Original entry on oeis.org

11, 19, 41, 61, 89, 101, 109, 149, 181, 191, 199, 401, 409, 419, 449, 461, 491, 499, 601, 619, 641, 661, 691, 809, 811, 881, 911, 919, 941, 991, 1009, 1019, 1049, 1061, 1069, 1091, 1109, 1181, 1409, 1481, 1489, 1499, 1601, 1609, 1619, 1669, 1699, 1801, 1811
Offset: 1

Views

Author

Keywords

Comments

A109066(n) = 0 iff prime(n) is in this sequence. [Reinhard Zumkeller, Jul 11 2010, corrected by M. F. Hasler, Aug 27 2012]
Or, primes p such that A193238(p) = 0. - M. F. Hasler, Aug 27 2012
Intersection of A084984 and A000040; complement of A179336 (within the primes A000040). [Reinhard Zumkeller, Jul 19 2011, edited by M. F. Hasler, Aug 27 2012]
The smallest prime that contains all the six nonprime decimal digits is a(694) = 104869 (see Prime Curios! link). - Bernard Schott, Mar 21 2023

Examples

			E.g. 149 is a prime made of nonprime digits(1,4,9).
991 is a prime without any prime digits.
		

Crossrefs

Programs

  • Haskell
    a034844 n = a034844_list !! (n-1)
    a034844_list = filter (not . any  (`elem` "2357") . show ) a000040_list
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Magma
    [p: p in PrimesUpTo(2000) | forall{d: d in [2,3,5,7] | d notin Set(Intseq(p))}];  // Bruno Berselli, Jul 27 2011
    
  • Mathematica
    Select[Prime[Range[279]], Intersection[IntegerDigits[#], {2, 3, 5, 7}] == {} &] (* Jayanta Basu, Apr 18 2013 *)
    Union[Select[Flatten[Table[FromDigits/@Tuples[{1,4,6,8,9,0},n],{n,2,4}]],PrimeQ]] (* Harvey P. Dale, Dec 08 2014 *)
  • PARI
    is_A034844(n)=isprime(n)&!apply(x->isprime(x),eval(Vec(Str(n)))) \\ M. F. Hasler, Aug 27 2012
    
  • PARI
    is_A034844(n)=isprime(n)&!setintersect(Set(Vec(Str(n))),Vec("2357")) \\ M. F. Hasler, Aug 27 2012
    
  • Python
    from sympy import isprime
    from itertools import product
    def auptod(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            for p in product("014689", repeat=d-1):
                if d > 1 and p[0] == "0": continue
                for end in "19":
                    s = "".join(p) + end
                    t = int(s)
                    if isprime(t): alst.append(t)
        return alst
    print(auptod(4)) # Michael S. Branicky, Nov 19 2021

Formula

a(n) >> n^1.285. [Charles R Greathouse IV, Feb 20 2012]

Extensions

Edited by N. J. A. Sloane, Feb 22 2009 at the suggestion of R. J. Mathar

A079066 "Memory" of prime(n): the number of distinct (previous) primes contained as substrings in prime(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 2, 0, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 0, 3, 2, 3, 4, 2, 0, 1, 2, 1, 2, 4, 3, 0, 1, 2, 3, 1, 2, 3, 2, 2, 3, 3, 2, 2, 3, 2, 1, 3, 2, 1, 3, 3, 2, 3, 3, 4, 2, 3, 3, 1, 3, 3, 3, 4, 4, 2, 2, 3, 0, 0, 2, 1, 3, 2, 2, 2, 0, 2, 1, 1, 2, 3, 1, 0, 0, 2, 1, 2, 4, 2, 3, 2, 2, 1, 3
Offset: 1

Views

Author

Joseph L. Pe, Feb 02 2003

Keywords

Examples

			The primes contained as substrings in prime(3) = 113 are 3, 11, 13. Hence a(30) = 3. 113 is the smallest prime with memory = 3.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a079066 n =
       length $ filter (`isInfixOf` (primesDec !! n)) $ take n primesDec
    primesDec = "_" : map show a000040_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Maple
    a:= n-> (s-> -1+nops(select(t -> t[1]<>"0" and isprime(parse(t)),
            {seq(seq(s[i..j], i=1..j), j=1..length(s))})))(""||(ithprime(n))):
    seq(a(n), n=1..105);  # Alois P. Heinz, Jul 29 2025
  • Mathematica
    ub = 105; tprime = Table[ToString[Prime[i]], {i, 1, ub}]; a = {}; For[i = 1, i <= ub, i++, m = 0; For[j = 1, j < i, j++, If[Length[StringPosition[tprime[[i]], tprime[[j]]]] > 0, m = m + 1]]; a = Append[a, m]]; a

Formula

a(n) = A039997(prime(n)) - 1.
a(n) = A039996(n) - 1. - Alois P. Heinz, Jul 29 2025

Extensions

Edited by Robert G. Wilson v, Feb 25 2003
Name clarified by Sean A. Irvine, Jul 29 2025

A179909 Primes with only one embedded prime.

Original entry on oeis.org

13, 17, 29, 31, 43, 47, 59, 67, 71, 79, 83, 97, 103, 107, 151, 163, 191, 199, 269, 281, 349, 421, 461, 463, 487, 509, 569, 607, 641, 661, 701, 709, 769, 787, 811, 821, 863, 877, 887, 907, 911, 919, 941, 1021, 1051, 1061, 1063, 1087, 1091, 1201, 1249, 1409
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 1.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179909 n = a179909_list !! (n-1)
    a179909_list = map (a000040 . (+ 1)) $ elemIndices 1 a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Mathematica
    f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 230, f@# == 2 &]

A179919 Primes with eleven embedded primes.

Original entry on oeis.org

111317, 113177, 113537, 113719, 113731, 117193, 117331, 121379, 123733, 129719, 131797, 132173, 132971, 136733, 136739, 137197, 137321, 137339, 137353, 137359, 137393, 137573, 152311, 172313, 173137, 173359, 174311, 193373, 211319, 213799
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 11.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179919 n = a179919_list !! (n-1)
    a179919_list = map (a000040 . (+ 1)) $ elemIndices 11 a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Mathematica
    f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 19110, f@# == 12 &]

A179335 a(n) is the smallest prime which appears as a substring of the decimal representation of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 3, 7, 19, 2, 2, 3, 3, 41, 3, 7, 3, 5, 61, 7, 7, 3, 7, 3, 89, 7, 101, 3, 7, 109, 3, 2, 3, 3, 3, 149, 5, 5, 3, 7, 3, 7, 181, 19, 3, 7, 19, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 401, 409, 19, 2, 3, 3, 3, 3, 449, 5, 61, 3, 7, 7, 7
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 11 2010

Keywords

Comments

a(n) < 10 iff prime(n) is in A179336;
a(n) = prime(n) iff prime(n) is in A033274. [Corrected by M. F. Hasler, Aug 27 2012]

Crossrefs

Programs

  • PARI
    A179335(n)={my(p=prime(n),m=0,M); for(d=1,n, M=10^d; n=p; until(n<=M || !n\=10, isprime(n%M) & (!m || m>n%M) & m=n%M); m & return(m))} \\ M. F. Hasler, Aug 27 2012
    
  • Python
    from sympy import isprime, prime
    def a(n):
        s = str(prime(n))
        ss = set(int(s[i:i+1+l]) for i in range(len(s)) for l in range(len(s)))
        return min(t for t in ss if isprime(t))
    print([a(n) for n in range(1, 94)]) # Michael S. Branicky, Jun 29 2022

A089768 Smallest prime which leaves n distinct primes when a suitable digit is deleted.

Original entry on oeis.org

13, 23, 131, 1013, 10193, 1347341, 13103171, 103471607
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2003

Keywords

Comments

No more terms < 3826400000. - David Wasserman, Oct 07 2005

Crossrefs

Cf. A033274.

Extensions

Corrected and extended by David Wasserman, Oct 07 2005

A089770 Smallest n-digit prime containing no prime substrings, or 0 if no such number exists.

Original entry on oeis.org

2, 11, 101, 1009, 10009, 100049, 1000081, 10000169, 100000049, 1000000009, 10000000069, 100000000069, 1000000000091, 10000000000099, 100000000000099, 1000000000000091, 10000000000000069, 100000000000000049
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2003

Keywords

Comments

For n > 1, a(n) ends in 1 or 9 while other digits can be 0,1,4,6,8 or 9. - Robert Israel, Dec 09 2017

Examples

			a(3) = 149 is a term as 1,4,9,14,49 are all nonprimes. 199 is not a member as 19 is a prime.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get terms until the first where a(n) > 10^(n-1)+10*N+9
    filter1:= proc(x)
      local k,j;
      for k from 0 to ilog10(x) do
         for j from k to ilog10(x)+1 do
           if isprime(floor((x mod 10^j)/10^k)) then return false fi;
      od od:
      true
    end proc:
    X:= select(filter1, [seq(seq(10*i+j,j=[1,9]),i=0..N)]):
    filter2:= proc(p,x)
        local k,j;
        if not isprime(p) then return false fi;
        for k from 1 to ilog10(x)+1 do
         if isprime(floor(p /10^k)) then return false fi
        od;
        true;
    end proc:
    for n from 1 do
    found:= false;
    for x in X do
        p:= 10^(n-1)+x;
        if filter2(p,x) then A[n]:= p; found:= true; break fi;
    od:
    if not found then break fi
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Dec 09 2017

Extensions

Corrected and extended by David Wasserman, Oct 12 2005

A179922 Primes with twelve embedded primes.

Original entry on oeis.org

113171, 113173, 113797, 123719, 153137, 179719, 199739, 213173, 229373, 231197, 233113, 233713, 236779, 237331, 237619, 237971, 241973, 259397, 317971, 327193, 343373, 353173, 361373, 372719, 373379, 382373, 432713, 519733, 521137, 521317
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 12.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179922 n = a179922_list !! (n-1)
    a179922_list = map (a000040 . (+ 1)) $ elemIndices 12 a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Mathematica
    f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 43150, f@# == 13 &]

A089771 Largest n-digit prime containing no prime substrings, or 0 if no such prime exists.

Original entry on oeis.org

7, 89, 991, 9949, 99469, 996649, 9999481, 99990091, 999996901, 9999988049, 99999981469, 999999946849, 9999999946009, 99999999904081, 999999999946069, 9999999999944869, 99999999999884081, 999999999999984469, 9999999999999968869, 99999999999999900049, 999999999999999944009, 9999999999999999999869
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2003

Keywords

Comments

Conjecture: No term is zero.

Crossrefs

Programs

  • Maple
    cbd:= proc(n)
      local x,L,i,flag;
      L:= convert(n,base,10);
      x:= n;
      for i from nops(L) to 1 by -1 do
        if member(L[i],{2,3,5,7}) then
          flag:= true;
          if L[i] = 3 then x:= x - 10^(i-1)- (x mod 10^(i-1)) -1 else x:= x - (x mod 10^(i-1)) - 1 fi;
          return x
        fi;
      od;
     x
    end proc:
    nps:= proc(n) option remember;
      if n <= 10 then not isprime(n)
      else not isprime(n) and nps(floor(n/10)) and nps(n mod 10^ilog10(n))
      fi
    end proc:
    npps:= proc(n) local L,i,t;
      if n <= 10 then true
      else
        if n::odd then return nps(floor(n/10)) and nps(n mod 10^ilog10(n)) fi;
        for i from 1 do
          t:= floor(n/10^i);
          if t::odd then return nps(t) and nps(t mod 10^ilog10(t))
          elif t = 0 then return true
      fi od fi
    end proc:
    g:= proc(n) local p,i,x;
      p:= 10^n;
      do
        p:= prevprime(p);
        x:= cbd(p);
        while x <> p do
          p:= prevprime(x+1);
          x:= cbd(p)
        od;
        if npps(p) then return p fi
      od
    end proc:
    g(1):= 7:
    map(g, [$1..30]); # Robert Israel, Aug 30 2024
  • Python
    from sympy import isprime
    from itertools import product
    def c(s): return not any(isprime(int(s[i:j])) for i in range(len(s)-1, -1, -1) for j in range(len(s), i, -1) if (i, j) != (0, len(s)))
    def a(n):
        if n == 1: return 7
        return next(t for p in product("986410", repeat=n-1) for last in "91" if isprime(t:=int(s:="".join(p)+last)) and c(s))
    print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Aug 30 2024

Extensions

More terms from David Wasserman, Oct 12 2005
More terms from Robert Israel, Aug 30 2024
Showing 1-10 of 27 results. Next