login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A090918
Beginning with 3, least prime, greater than the previous term, such that the arithmetic mean of first n terms is a prime.
2
3, 7, 11, 23, 41, 53, 79, 127, 313, 353, 431, 443, 599, 863, 1049, 1669, 3643, 3919, 4177, 4657, 4861, 5261, 6449, 6737, 7057, 8821, 9013, 9337, 10513, 11161, 13309, 13693, 14449, 14537, 15137, 15377, 15439, 15991, 16231, 16607, 16889, 17489
OFFSET
1,1
COMMENTS
Intersection of A090918 and A090919: 3, 7, 11, 23, 11161, 4197541. - Zak Seidov, Apr 05 2011
FORMULA
a(n) = n*A090919(n) - (n-1)*A090919(n-1). - Vladimir Shevelev, Nov 24 2012
MATHEMATICA
f[s_] := Block[{m = 1 + Length@ s, p = NextPrime@ s[[-1]], ss = Plus @@ s}, While[ !PrimeQ[(ss + p)/m], p = NextPrime@ p]; Append[s, p]]; Nest[f, {3}, 41] (* Robert G. Wilson v, Dec 15 2012 *)
PROG
(PARI) {terms=100; A090918=A090919=vector(terms); A090918[1]=A090919[1]=3; s=0; for(k=2, terms, s=s+A090918[k-1]; p=A090918[k-1]+1; until(isprime(p) && (denominator((s+p)/k)==1) && isprime((s+p)/k), p++); A090918[k]=p; A090919[k]=(s+p)/k; print1(A090918[k], ", ") ); A090918}
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Dec 16 2003
EXTENSIONS
Corrected and extended by Rick L. Shepherd, Mar 08 2004
STATUS
approved