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.

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

This page as a plain text file.
%I A094710 #10 May 29 2021 19:57:21
%S A094710 5,29,197,2309,30013,510451,9699667,223092791,6469693129,200560490047,
%T A094710 7420738134571,304250263527139,13082761331669881,614889782588491043,
%U A094710 32589158477190044657,1922760350154212638159,117288381359406970982957,7858321551080267055878717,557940830126698960967414867
%N A094710 Smaller of a pair (p,q) of primes with (p+q)/2=prime(n)# and q-p is minimal.
%C A094710 a(n) = Max{p prime: (p+q)/2=prime(n)# for another prime q>p};
%C A094710 a(n) = A002110(n) - A094709(n); (a(n) + A094711(n))/2 = A002110(n).
%o A094710 (Python)
%o A094710 from sympy import isprime, prime, primerange
%o A094710 def aupton(terms):
%o A094710   phash, alst = 2, []
%o A094710   for p in primerange(3, prime(terms)+1):
%o A094710     phash *= p
%o A094710     for k in range(1, phash//2):
%o A094710       if isprime(phash-k) and isprime(phash+k): alst.append(phash-k); break
%o A094710   return alst
%o A094710 print(aupton(20)) # _Michael S. Branicky_, May 29 2021
%Y A094710 Cf. A002110, A094709, A094711.
%K A094710 nonn
%O A094710 2,1
%A A094710 _Reinhard Zumkeller_, May 21 2004
%E A094710 Corrected by _T. D. Noe_, Nov 15 2006
%E A094710 a(12)-a(20) from _Donovan Johnson_, Apr 27 2008