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.

Showing 1-2 of 2 results.

A217721 Number of primes between n^2 - log_2(n)^2 and n^2 (inclusive).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 2, 3, 2, 1, 2, 3, 2, 2, 2, 3, 4, 4, 3, 3, 2, 3, 4, 4, 3, 3, 3, 5, 4, 4, 4, 2, 2, 4, 5, 2, 5, 2, 3, 4, 4, 3, 4, 5, 5, 3, 5, 7, 2, 3, 6, 6, 4, 5, 3, 3, 5, 6, 4, 5, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 5, 4, 4, 2, 4, 4, 5, 5, 6, 5, 6, 5, 4, 6, 2, 7
Offset: 1

Views

Author

Alex Ratushnyak, Mar 21 2013

Keywords

Comments

Conjecture: a(n) > 0 for n > 1.
Conjecture checked up to n = 2^28 - 1.

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n^2, n^2 - Log[2, n]^2, -1], PrimeQ]], {n, 100}] (* T. D. Noe, Mar 21 2013 *)
  • Python
    import math
    def isprime(k):
      s = 3
      while s*s <= k:
        if k%s==0:  return 0
        s+=2
      return 1
    for n in range(1, 333):
      c = 0
      top = n*n
      for i in range(top - int(math.log(n, 2)**2), top):
        if i&1:  c += isprime(i)
      print(str(c), end=', ')

A069922 Number of primes p such that n^n <= p <= n^n + n^2.

Original entry on oeis.org

1, 2, 2, 4, 1, 5, 4, 1, 2, 5, 1, 4, 4, 9, 7, 6, 2, 4, 7, 9, 7, 3, 7, 10, 10, 6, 12, 6, 10, 7, 8, 10, 7, 9, 13, 13, 7, 10, 11, 11, 9, 13, 11, 10, 15, 10, 11, 10, 19, 14, 16, 11, 16, 21, 20, 12, 9, 15, 21, 12, 10, 16, 15, 22, 19, 17, 18, 12, 19, 20, 13, 17, 13, 13, 17, 23
Offset: 1

Views

Author

Benoit Cloitre, May 05 2002

Keywords

Comments

Question: for any n>0, is there at least one prime p such that n^n <= p <= n^n + n^2? In this case, that would be stronger than the Schinzel conjecture: "for m > 1 there's at least one prime p such that m <= p <= m + log(m)^2" since n^2 < log(n^n)^2 = n^2*log(n)^2.

Crossrefs

Programs

  • PARI
    for(n=1,65,print1(sum(i=n^n,n^n+n^2,isprime(i)),","))

Extensions

a(66)-a(76) from Alex Ratushnyak, Apr 20 2014
Showing 1-2 of 2 results.