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-4 of 4 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

A257667 Primes containing a digit 5.

Original entry on oeis.org

5, 53, 59, 151, 157, 251, 257, 353, 359, 457, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 653, 659, 751, 757, 853, 857, 859, 953, 1051, 1151, 1153, 1259, 1451, 1453, 1459, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579
Offset: 1

Views

Author

Vincenzo Librandi, May 03 2015

Keywords

Comments

Subsequence of primes of A011535. - Michel Marcus, May 03 2015
Primes in A062671. - Bruno Berselli, May 03 2015

Crossrefs

Cf. prime numbers containing the string k: A208270 (k=1), A208272 (k=2), A212525 (k=3), this sequence (k=5), A257668 (k=7), A166571 (k=10), A166572 (k=11), A243529 (k=12), A166573 (k=13), A243530 (k=14), A243531 (k=15), A243532 (k=16), A166579 (k=17), A243527 (k=111), A166580 (k=222), A166581 (k=333), A166582 (k=444).
Cf. A011535, A062671, A243531 (subsequence).

Programs

  • Magma
    [p: p in PrimesUpTo(1600) | 5 in Intseq(p)];
    
  • Mathematica
    Select[Prime[Range[250]], ! StringFreeQ[ToString[#], "5"] &]
  • PARI
    forprime(p=1, 1600, if(vecsearch(vecsort(digits(p)), 5), print1(p, ", "))) \\ Derek Orr, May 05 2015; corrected by Michel Marcus, Oct 30 2023
  • Sage
    [p for p in primes(1600) if 5 in p.digits(base=10)] # Bruno Berselli, May 03 2015
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Nov 01 2022

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 *)

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 *)
Showing 1-4 of 4 results.