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!)
A108231 a(n) = the first prime in the earliest sequence of 2n+1 consecutive primes whose average is prime. 0

%I #11 Oct 25 2017 17:15:35

%S 3,71,7,463,31,43,5,7,499,821,109,97,271,263,179,97,181,47,233,1931,

%T 359,227,1787,443,29,131,1061,229,599,1931,7,317,53,2207,811,11549,

%U 2411,2879,5531,937,2371,293,21001,659,643,1187,2927,4567,131,263,8419,349

%N a(n) = the first prime in the earliest sequence of 2n+1 consecutive primes whose average is prime.

%e 71 is the first prime in the earliest sequence of 5 = 2 * 2 + 1 consecutive primes whose average is a prime, since (71 + 73 + 79 + 83 + 89)/5 = 79. Therefore a(2) = 71.

%t f[n_] := Block[{k = 1}, While[ !PrimeQ[ Sum[ Prime[j], {j, k, 2n + k}]/(2n + 1)], k++ ]; Prime[k]]; Table[ f[n], {n, 52}] (* _Robert G. Wilson v_, Jun 21 2005 *)

%t Module[{prs=Prime[Range[25000]]},Table[SelectFirst[Partition[ prs,2n+1,1], PrimeQ[ Mean[ #]]&],{n,60}]][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 25 2017 *)

%K nonn

%O 1,1

%A _Joseph L. Pe_, Jun 16 2005

%E More terms from _Robert G. Wilson v_, Jun 21 2005

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 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)