OFFSET
1,2
MATHEMATICA
a[n_] := a[n]=Module[{s, k, t}, s=a/@Range[1, n-1]; For[k=t=1, True, t+=++k, If[Mod[t, n]==0&&!MemberQ[s, t], Return[t]]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 16 2002
EXTENSIONS
Edited by Dean Hickerson, Oct 15 2002
STATUS
approved