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
3, 71, 7, 463, 31, 43, 5, 7, 499, 821, 109, 97, 271, 263, 179, 97, 181, 47, 233, 1931, 359, 227, 1787, 443, 29, 131, 1061, 229, 599, 1931, 7, 317, 53, 2207, 811, 11549, 2411, 2879, 5531, 937, 2371, 293, 21001, 659, 643, 1187, 2927, 4567, 131, 263, 8419, 349 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
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.
MATHEMATICA
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 *)
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 *)
CROSSREFS
Sequence in context: A135951 A361254 A093245 * A130894 A254665 A106894
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jun 16 2005
EXTENSIONS
More terms from Robert G. Wilson v, Jun 21 2005
STATUS
approved

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 August 14 16:54 EDT 2024. Contains 375166 sequences. (Running on oeis4.)