login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094711 Larger of a pair (p,q) of primes with (p+q)/2=prime(n)# and q-p is minimal. 2

%I #9 May 29 2021 19:52:46

%S 7,31,223,2311,30047,510569,9699713,223092949,6469693331,200560490213,

%T 7420738135049,304250263527281,13082761331670179,614889782588491777,

%U 32589158477190044803,1922760350154212639981,117288381359406970983583

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

%C a(n) = Min{p prime: (p+q)/2=prime(n)# for another prime q<p};

%C a(n) = A002110(n) + A094709(n); (a(n) + A094710(n))/2 = A002110(n).

%o (Python)

%o from sympy import isprime, prime, primerange

%o def aupton(terms):

%o phash, alst = 2, []

%o for p in primerange(3, prime(terms)+1):

%o phash *= p

%o for k in range(1, phash//2):

%o if isprime(phash-k) and isprime(phash+k): alst.append(phash+k); break

%o return alst

%o print(aupton(18)) # _Michael S. Branicky_, May 29 2021

%Y Cf. A002110, A094709, A094710.

%K nonn

%O 2,1

%A _Reinhard Zumkeller_, May 21 2004

%E Corrected by _T. D. Noe_, Nov 15 2006

%E More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 01 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)