OFFSET
1,2
MATHEMATICA
a[1] = 1; a[n_] := a[n] = (p = n*a[n - 1] + 1; If[ PrimeQ[n], p, p - 2]); Table[ a[n], {n, 20}] (* Robert G. Wilson v, Apr 08 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 05 2004
EXTENSIONS
More terms from Robert G. Wilson v, Apr 08 2004
STATUS
approved