OFFSET
1,1
COMMENTS
a(1000) = 13918649. - Rick L. Shepherd, Mar 08 2004
Contribution by Vladimir Shevelev, Nov 24 2012 (Start)
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
Zak Seidov, Table n, a(n) for n=1..2000
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Dec 16 2003
EXTENSIONS
Corrected and extended by Rick L. Shepherd, Mar 08 2004
STATUS
approved