OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
MATHEMATICA
a[n_] := a[n] = Block[{k = Prime@n - 1}, While[ GCD[k, a[n - 1]] > 1, k-- ]; k]; a[1] = a[2] = 1; Table[ a[n], {n, 0, 60}] (* Robert G. Wilson v, May 04 2009 *)
nxt[{n_, a_}]:=Module[{k=Prime[n+1]-1}, {n+1, While[!CoprimeQ[k, a], k--]; k}]; NestList[nxt, {0, 1}, 60][[All, 2]] (* Harvey P. Dale, Sep 09 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 02 2009
EXTENSIONS
More terms from Robert G. Wilson v, May 04 2009
STATUS
approved