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.

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