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 14 results. Next

A033274 Primes that do not contain any other prime as a proper substring.

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, 881, 991, 1009, 1049, 1069, 1481, 1609, 1669, 1699, 1801, 4001, 4049, 4481, 4649, 4801, 4909, 4969, 6091, 6469, 6481, 6869, 6949, 8009, 8069, 8081, 8609, 8669, 8681
Offset: 1

Views

Author

Keywords

Comments

If there is more than one digit, all digits must be nonprime numbers.
A179335(n) = prime(n) iff prime(n) is in this sequence. For n > 4, prime(n) is in this sequence iff A109066(n) = 0. - Reinhard Zumkeller, Jul 11 2010, corrected by M. F. Hasler, Aug 27 2012
A079066(n) = 0 iff prime(n) is in this sequence. [Corrected by M. F. Hasler, Aug 27 2012]
What are the asymptotics of this sequence? - Charles R Greathouse IV, Aug 27 2012

Examples

			149 is a term as 1, 4, 9, 14, 49 are all nonprimes.
199 is not a term as 19 is a prime.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a033274 n = a033274_list !! (n-1)
    a033274_list = map (a000040 . (+ 1)) $ elemIndices 0 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@ 1100, f@# == 1 &] (* Robert G. Wilson v, Aug 01 2010 *)
    Select[Prime[Range[1100]],NoneTrue[Flatten[Table[FromDigits/@Partition[IntegerDigits[#],d,1],{d,IntegerLength[#]-1}]],PrimeQ]&] (* Harvey P. Dale, Apr 19 2025 *)
  • Python
    from sympy import isprime
    def ok(n):
        if n in {2, 3, 5, 7}: return True
        s = str(n)
        if set(s) & {"2", "3", "5", "7"} or not isprime(n): return False
        ss2 = set(s[i:i+l] for i in range(len(s)-1) for l in range(2, len(s)))
        return not any(isprime(int(ss)) for ss in ss2)
    print([k for k in range(9000) if ok(k)]) # Michael S. Branicky, Jun 29 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Luca Colucci, Apr 03 2008

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

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 &]

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 &]

A179910 Primes with two embedded primes.

Original entry on oeis.org

23, 37, 53, 73, 127, 139, 157, 167, 193, 211, 227, 229, 241, 251, 263, 277, 307, 331, 383, 389, 419, 433, 439, 443, 457, 467, 503, 521, 541, 557, 563, 577, 587, 599, 619, 631, 643, 647, 659, 677, 683, 727, 751, 757, 761, 827, 829, 839, 857, 859, 883, 929
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

It appears that p having n embedded primes means that the set of prime integers generated by contiguous proper substrings of p has size n.
A079066(a(n)) = 2.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179910 n = a179910_list !! (n-1)
    a179910_list = map (a000040 . (+ 1)) $ elemIndices 2 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@ 160, f@# == 3 &]
    Select[ Prime@ Range@ 160, Function[ n, Length@ Select[ Union[ FromDigits /@ (Flatten[ Table[ Partition[#, k, 1], {k, Length@ # - 1}], 1] &)@ IntegerDigits@ n], PrimeQ]]@ # == 2 &] (* Michael Somos, Jan 13 2011 *)

A179911 Primes with three embedded primes.

Original entry on oeis.org

113, 131, 179, 197, 223, 233, 239, 257, 271, 283, 293, 311, 313, 337, 347, 353, 359, 367, 397, 431, 479, 547, 571, 593, 613, 617, 653, 719, 733, 739, 743, 773, 797, 823, 853, 937, 953, 971, 1013, 1031, 1097, 1103, 1117, 1129, 1151, 1163, 1213, 1217, 1229
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 3.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179911 n = a179911_list !! (n-1)
    a179911_list = map (a000040 . (+ 1)) $ elemIndices 3 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@ 210, f@# == 4 &]

A179912 Primes with four embedded primes.

Original entry on oeis.org

137, 173, 317, 373, 379, 523, 673, 1123, 1153, 1171, 1193, 1223, 1231, 1277, 1279, 1283, 1297, 1307, 1327, 1531, 1579, 1597, 1613, 1637, 1759, 1783, 1823, 1913, 1931, 2053, 2153, 2333, 2339, 2341, 2351, 2393, 2399, 2411, 2467, 2503, 2539, 2543, 2557
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 4.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179912 n = a179912_list !! (n-1)
    a179912_list = map (a000040 . (+ 1)) $ elemIndices 4 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@ 380, f@# == 5 &]

A179913 Primes with five embedded primes.

Original entry on oeis.org

1237, 1319, 1367, 1523, 1571, 1723, 1753, 1979, 1997, 2131, 2179, 2239, 2273, 2293, 2297, 2357, 2377, 2383, 2389, 2417, 2437, 2473, 2531, 2579, 2593, 2617, 2711, 2731, 2753, 2797, 3119, 3167, 3257, 3271, 3313, 3371, 3547, 3571, 3593, 3617, 3671, 3677
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 5.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179913 n = a179913_list !! (n-1)
    a179913_list = map (a000040 . (+ 1)) $ elemIndices 5 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@ 510, f@# == 6 &]

A179914 Primes with six embedded primes.

Original entry on oeis.org

1733, 1973, 2113, 2137, 2237, 2311, 2347, 2371, 2713, 2719, 2837, 2953, 2971, 3373, 3673, 3719, 3733, 3739, 4337, 4373, 4397, 4673, 5231, 5233, 5347, 5479, 6131, 6197, 6317, 6733, 6737, 7193, 7331, 7523, 8237, 8317, 8537, 9719, 10313, 10337, 10937
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 6.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179914 n = a179914_list !! (n-1)
    a179914_list = map (a000040 . (+ 1)) $ elemIndices 6 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@ 1330, f@# == 7 &]

A179915 Primes with seven embedded primes.

Original entry on oeis.org

1373, 3137, 3797, 5237, 6173, 11173, 11311, 11353, 11719, 11731, 11971, 12113, 12239, 12347, 12377, 12953, 12973, 13127, 13177, 13217, 13537, 13597, 13679, 13709, 13711, 13723, 13729, 13751, 13757, 13759, 13799, 13967, 13997, 15137
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) = 7.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a179915 n = a179915_list !! (n-1)
    a179915_list = map (a000040 . (+ 1)) $ elemIndices 7 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@ 1770, f@# == 8 &]
Showing 1-10 of 14 results. Next