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.

This page as a plain text file.
%I A220095 #10 Dec 04 2012 15:36:18
%S A220095 1,2,11,29,125,126,127
%N A220095 n such that there are no primes between n - sqrt(n) and n.
%C A220095 Conjecture: This sequence is complete.
%t A220095 Select[Range[1000], PrimePi[# - 1] == PrimePi[# - Sqrt[#]] &] (* _Alonso del Arte_, Dec 04 2012 *)
%o A220095 (JavaScript)
%o A220095 function isprime(i) {
%o A220095 var i, j;
%o A220095 if (i == 1) return false;
%o A220095 if (i == 2) return true;
%o A220095 if (i % 2 == 0) return false;
%o A220095 for (j = 3; j <= Math.floor(Math.sqrt(i)); j += 2)
%o A220095 if (i % j == 0) return false;
%o A220095 return true;
%o A220095 }
%o A220095 for (n = 1; n < 100000; n++) {
%o A220095 for (k = Math.ceil(n - Math.sqrt(n)); k < n; k++) {
%o A220095 ip = false;
%o A220095 if (isprime(k)) {ip = true; break;}
%o A220095 }
%o A220095 if (!ip) document.write(n + ", ");
%o A220095 }
%Y A220095 Cf. A035250.
%K A220095 nonn,fini
%O A220095 1,2
%A A220095 _Jon Perry_, Dec 04 2012