OFFSET
1,1
COMMENTS
Successive differences are 1,2,6,8,10,12,42,24,72,20,132,36,52,14,30,16,... and the n-th term is a multiple of n.
Conjecture: a(n) ~ c n^2 log(n) for some positive constant c. - Robert Israel, Oct 26 2015
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Zak Seidov, Graph of first differences of A084697.
MAPLE
a[1]:= 2: a[2]:= 3:
for n from 2 to 1000 do
if n::odd then delta:= 2*n
else delta:= n
fi:
for q from a[n] + delta by delta while not isprime(q) do od:
a[n+1]:= q
od:
seq(a[i], i=1..1000); # Robert Israel, Oct 26 2015
MATHEMATICA
nxt[{n_, a_}]:=Module[{k=1}, While[!PrimeQ[a+k*n], k++]; {n+1, a+k*n}]; Transpose[NestList[nxt, {1, 2}, 50]][[2]] (* Harvey P. Dale, Apr 11 2014 *)
PROG
(PARI) lista(nn) = {print1(a=2, ", "); for (n=1, nn, k=1; while (!isprime(na=a+k*n), k++); a = na; print1(a, ", "); ); } \\ Michel Marcus, Oct 21 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 05 2003
EXTENSIONS
More terms from David Wasserman, Dec 30 2004
Definition corrected by Zak Seidov, Apr 24 2015
STATUS
approved