[go: up one dir, main page]

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”).

A090919
Primes arising as the arithmetic mean of first n terms of A090918.
2
3, 5, 7, 11, 17, 23, 31, 43, 73, 101, 131, 157, 191, 239, 293, 379, 571, 757, 937, 1123, 1301, 1481, 1697, 1907, 2113, 2371, 2617, 2857, 3121, 3389, 3709, 4021, 4337, 4637, 4937, 5227, 5503, 5779, 6047, 6311, 6569, 6829, 7079, 7349, 7639, 7927, 8263, 8599
OFFSET
1,1
COMMENTS
a(1000) = 13918649. - Rick L. Shepherd, Mar 08 2004
Intersection of A090918 and A090919: 3,7,11,23,11161,4197541. - Zak Seidov, Apr 05 2011.
Contribution by Vladimir Shevelev, Nov 24 2012 (Start)
A recursive algorithm of parallel calculation of A090918 and A090919.
Together with a(n)=A090919(n), denote b(n)=A090918(n). We begin with a(1)=b(1)=3; if, for n>=2, we know a(n-1) and b(n-1), then a(n) is the smallest prime x such that n*x-(n-1)*a(n-1) is a prime greater than b(n-1). Now, knowing a(n), we have b(n) = n*a(n) - (n-1)*a(n-1).
For example, suppose that we know that a(5)=17, b(5)=41. To find a(6) and b(6), consider inequality 6*x - 5*17 > 41, where x is prime. Thus we consider x >= 23. Since, already for x=23, 6*x-5*17=53 is prime, then a(6)=23, b(6)=53. (End)
LINKS
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]]; s = Nest[f, {3}, 41]; (Accumulate@ s)/Range@ 42 (* 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(A090919[k], ", ") ); A090919}
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Dec 16 2003
EXTENSIONS
Corrected and extended by Rick L. Shepherd, Mar 08 2004
STATUS
approved