login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A220095
n such that there are no primes between n - sqrt(n) and n.
0
1, 2, 11, 29, 125, 126, 127
OFFSET
1,2
COMMENTS
Conjecture: This sequence is complete.
MATHEMATICA
Select[Range[1000], PrimePi[# - 1] == PrimePi[# - Sqrt[#]] &] (* Alonso del Arte, Dec 04 2012 *)
PROG
(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 + ", ");
}
CROSSREFS
Cf. A035250.
Sequence in context: A295841 A086252 A106926 * A133558 A285812 A140745
KEYWORD
nonn,fini
AUTHOR
Jon Perry, Dec 04 2012
STATUS
approved