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-7 of 7 results.

A166580 Prime numbers containing the string 222.

Original entry on oeis.org

2221, 12227, 22229, 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 42221, 42223, 42227, 52223, 72221, 72223, 72227, 72229, 82223, 92221, 92227, 102229, 112223, 122201, 122203, 122207, 122209, 122219, 122231, 122251, 122263, 122267, 122273, 122279, 122299, 132229, 142223
Offset: 1

Views

Author

Vincenzo Librandi, Nov 01 2009

Keywords

Crossrefs

Programs

  • Magma
    res := []; for n in [1..15000] do p := NthPrime(n); digits := IntegerToSequence(p); for i in [1..#digits - 2] do if digits[i..i+2] eq [2,2,2] then Append(~res, p); break; end if; end for; end for; res; // Vincenzo Librandi, Jul 16 2025
  • Mathematica
    p222Q[n_] := Module[{idn = IntegerDigits[n]}, MemberQ[Partition[idn, 3, 1], {2, 2, 2}]]; Select[Prime[Range[15000]], p222Q] (* Vincenzo Librandi Sep 14 2012 *)
    Select[Prime[Range[12000]],SequenceCount[IntegerDigits[#],{2,2,2}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 08 2017 *)
  • PARI
    contains(n,k)=my(N=digits(n),K=digits(k)); for(i=0,#N-#K, for(j=1,#K,if(N[i+j]!=K[j],next(2))); return(1)); 0
    is(n)=isprime(n) && contains(n,222) \\ Charles R Greathouse IV, Jun 20 2014
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jun 20 2014

A167290 Primes containing 888 as a substring.

Original entry on oeis.org

8887, 48883, 48889, 58889, 68881, 78887, 78889, 88801, 88807, 88811, 88813, 88817, 88819, 88843, 88853, 88861, 88867, 88873, 88883, 88897, 98887, 108881, 108883, 108887, 138883, 138889, 158881, 168887, 178889, 188801, 188827, 188831, 188833
Offset: 1

Views

Author

Vincenzo Librandi, Nov 01 2009

Keywords

Crossrefs

Programs

  • Mathematica
    p888Q[n_] := Module[{idn=IntegerDigits[n]}, MemberQ[Partition[idn, 3, 1], {8, 8, 8}]]; Select[Prime[Range[20000]], p888Q] (* Vincenzo Librandi, Sep 15 2013 *)

A167292 Primes containing 999 as a substring.

Original entry on oeis.org

1999, 2999, 4999, 8999, 13999, 19991, 19993, 19997, 25999, 32999, 35999, 41999, 49991, 49993, 49999, 52999, 56999, 59999, 69991, 69997, 70999, 71999, 73999, 77999, 79997, 79999, 85999, 94999, 98999, 99901, 99907, 99923, 99929, 99961
Offset: 1

Views

Author

Vincenzo Librandi, Nov 01 2009

Keywords

Crossrefs

Programs

  • Mathematica
    p999Q[n_] := Module[{idn=IntegerDigits[n]}, MemberQ[Partition[idn, 3, 1], {9, 9, 9}]]; Select[Prime[Range[10000]], p999Q] (* Vincenzo Librandi, Sep 15 2013 *)

A243527 Prime numbers containing the string 111.

Original entry on oeis.org

1117, 2111, 4111, 8111, 10111, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173, 11177, 11197, 16111, 22111, 25111, 26111, 28111, 35111, 40111, 41113, 41117, 44111, 47111, 50111, 58111, 65111, 68111, 70111, 71119, 79111, 80111
Offset: 1

Views

Author

Vincenzo Librandi, Jun 06 2014

Keywords

Crossrefs

Cf. prime numbers containing the string kkk: this sequence (k=1), A166580 (k=2), A166581 (k=3), A166582 (k=4), A167281 (k=5), A131645 (k=6), A167282 (k=7), A167290 (k=8), A167292 (k=9).

Programs

  • Mathematica
    Select[Prime[Range[90000]], !StringFreeQ[ToString[#], "111"]&]
  • PARI
    contains(n,k)=my(N=digits(n),K=digits(k)); for(i=0,#N-#K, for(j=1,#K,if(N[i+j]!=K[j],next(2))); return(1)); 0
    is(n)=isprime(n) && contains(n,111) \\ Charles R Greathouse IV, Jun 20 2014

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jun 20 2014

A386240 Primes containing the digit string "007" in their decimal representation.

Original entry on oeis.org

4007, 6007, 9007, 10007, 10079, 12007, 13007, 16007, 20071, 24007, 30071, 36007, 45007, 50077, 60077, 61007, 64007, 70079, 78007, 80071, 80077, 82007, 88007, 90007, 90071, 90073, 94007, 97007, 100703, 100733, 100741, 100747, 100769, 100787, 100799, 103007, 108007
Offset: 1

Views

Author

Hugo Pfoertner, Jul 16 2025

Keywords

Comments

Could also be called "James Bond" primes.

Crossrefs

Programs

  • Maple
    q:= n-> isprime(n) and searchtext("007", ""||n)>0:
    select(q, [$1..110000])[];  # Alois P. Heinz, Jul 17 2025
  • Mathematica
    Select[Prime[Range[553, 12000]], StringContainsQ[IntegerString[#], "007"] &] (* Paolo Xausa, Jul 17 2025 *)
  • PARI
    is(n) = if(!isprime(n), return(0)); while(n > 10, if(n%1000==7, return(1)); n\=10); 0 \\ David A. Corneth, Jul 17 2025
  • Python
    from sympy import sieve
    print([sieve[n] for n in range(1,10200) if "007" in str(sieve[n])]) # Karl-Heinz Hofmann, Jul 17 2025
    

A386247 Primes containing 000 as a substring.

Original entry on oeis.org

10007, 10009, 40009, 70001, 70003, 70009, 90001, 90007, 100003, 100019, 100043, 100049, 100057, 100069, 130003, 140009, 150001, 160001, 160009, 170003, 180001, 180007, 200003, 200009, 200017, 200023, 200029, 200033, 200041, 200063, 200087, 220009, 230003, 240007
Offset: 1

Views

Author

Alois P. Heinz, Jul 16 2025

Keywords

Comments

Differs from A164968 first at n=10: a(10) = 100019 < 200003 = A164968(10).

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1230, 25000]], StringContainsQ[IntegerString[#], "000"] &] (* Paolo Xausa, Jul 19 2025 *)

A298729 Prime numbers whose decimal expansion includes a substring of seven consecutive 7's.

Original entry on oeis.org

137777777, 177777773, 177777779, 197777777, 307777777, 347777777, 437777777, 527777777, 547777777, 577777777, 587777777, 647777777, 697777777, 777777701, 777777739, 777777743, 777777751, 777777799, 787777777, 827777777, 947777777, 967777777, 1247777777, 1277777771, 1277777773, 1457777777, 1487777777
Offset: 1

Views

Author

Yohei Furutono, Jan 25 2018

Keywords

Crossrefs

Programs

  • Mathematica
    s = {7, 7, 7, 7, 7, 7, 7}; lst = {}; k = 1; While[k < 10001, l = 1; il = 12;
    While[l < il, p = FromDigits@ Flatten@ Insert[ IntegerDigits[k, 10, 10], s, l];
      If[PrimeQ@ p, AppendTo[lst, p]]; l++]; k++]; Union@ lst (* Robert G. Wilson v, Feb 08 2018 *)
  • PARI
    is(n) = my(v=vector(7, x, 7), d=digits(n)); for(k=1, #d-6, if([d[k], d[k+1], d[k+2], d[k+3], d[k+4], d[k+5], d[k+6]]==v, return(1))); 0
    forprime(p=1, , if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Mar 06 2018
Showing 1-7 of 7 results.