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.

A094711 Larger of a pair (p,q) of primes with (p+q)/2=prime(n)# and q-p is minimal.

Original entry on oeis.org

7, 31, 223, 2311, 30047, 510569, 9699713, 223092949, 6469693331, 200560490213, 7420738135049, 304250263527281, 13082761331670179, 614889782588491777, 32589158477190044803, 1922760350154212639981, 117288381359406970983583
Offset: 2

Views

Author

Reinhard Zumkeller, May 21 2004

Keywords

Comments

a(n) = Min{p prime: (p+q)/2=prime(n)# for another prime q
a(n) = A002110(n) + A094709(n); (a(n) + A094710(n))/2 = A002110(n).

Crossrefs

Programs

  • Python
    from sympy import isprime, prime, primerange
    def aupton(terms):
      phash, alst = 2, []
      for p in primerange(3, prime(terms)+1):
        phash *= p
        for k in range(1, phash//2):
          if isprime(phash-k) and isprime(phash+k): alst.append(phash+k); break
      return alst
    print(aupton(18)) # Michael S. Branicky, May 29 2021

Extensions

Corrected by T. D. Noe, Nov 15 2006
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 01 2008