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.

A220095 n such that there are no primes between n - sqrt(n) and n.

Original entry on oeis.org

1, 2, 11, 29, 125, 126, 127
Offset: 1

Views

Author

Jon Perry, Dec 04 2012

Keywords

Comments

Conjecture: This sequence is complete.

Crossrefs

Cf. A035250.

Programs

  • JavaScript
    function isprime(i) {
    var i, j;
    if (i == 1) return false;
    if (i == 2) return true;
    if (i % 2 == 0) return false;
    for (j = 3; j <= Math.floor(Math.sqrt(i)); j += 2)
    if (i % j == 0) return false;
    return true;
    }
    for (n = 1; n < 100000; n++) {
    for (k = Math.ceil(n - Math.sqrt(n)); k < n; k++) {
    ip = false;
    if (isprime(k)) {ip = true; break;}
    }
    if (!ip) document.write(n + ", ");
    }
  • Mathematica
    Select[Range[1000], PrimePi[# - 1] == PrimePi[# - Sqrt[#]] &] (* Alonso del Arte, Dec 04 2012 *)