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.

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