OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..3318
FORMULA
For n >= 3, a(n) = A151800(S+(-1)^S) where S = Sum_{i=1..n-1} a(i). - Robert Israel, May 01 2019
MAPLE
A[1]:= 2: A[2]:= 3: S:= 5:
for i from 3 to 50 do
if S::even then A[i]:= nextprime(S+1)
else A[i]:= nextprime(S-1)
fi;
S:= S + A[i]
od:
seq(A[i], i=1..50); # Robert Israel, May 01 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 03 2002
EXTENSIONS
Corrected and extended by Sascha Kurz, Feb 12 2003
STATUS
approved