A024675 Average of two consecutive odd primes.
4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279, 282, 288, 300
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Gareth McCaughan et al., in reply to Keith F. Lynch, Interprimes (was Re: Guess the rule), math-fun mailing list, April 7, 2025
- Eric Weisstein's World of Mathematics, Interprime
- Wikipedia contributors, Legendre's conjecture, in: Wikipedia, The Free Encyclopedia. Retrieved April 7, 2025.
Programs
-
Maple
seq( ( (ithprime(x)+ithprime(x+1))/2 ),x=2..40);
-
Mathematica
Plus @@@ Partition[Table[Prime[n], {n, 2, 100}], 2, 1]/2 ListConvolve[{1, 1}/2, Prime /@ Range[2, 70]] (* Jean-François Alcover, Jun 25 2013 *) Mean/@Partition[Prime[Range[2,70]],2,1] (* Harvey P. Dale, Jul 28 2020 *)
-
PARI
for(X=2,50,print((prime(X)+prime(X+1))/2)) \\ Hauke Worpel (thebigh(AT)outgun.com), May 08 2008
-
PARI
first(n)=my(v=primes(n+2)); vector(n,i,v[i+1]+v[i+2])/2 \\ Charles R Greathouse IV, Jun 25 2013
-
Python
from sympy import prime def a(n): return (prime(n + 1) + prime(n + 2)) // 2 print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017
Formula
a(n) = (prime(n+1)+prime(n+2))/2 = A001043(n+1)/2. - Omar E. Pol, Feb 02 2012
Conjecture: a(n) = ceiling(sqrt(prime(n+1)*prime(n+2))). - Thomas Ordowski, Mar 22 2013 [This requires gaps to be smaller than approximately sqrt(8p) and hence requires a result on prime gaps slightly stronger than that provided by the Riemann hypothesis. - Charles R Greathouse IV, Jul 13 2022]
Comments