OFFSET
1,1
COMMENTS
Complement means that c(i) is the i-th member of the sorted list of integers >=1 that are not in the set {a(1),...,a(i-1)}. - R. J. Mathar, Aug 06 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
mex := First[Complement[Range[1, Max[#1] + 1], #1]] &;
a[1] = 3; c[1] = 1; c[2] = 2;
a[n_] := a[n] = a[n - 1] + c[n - 1];
c[n_] := c[n] = mex[Flatten[Table[{a[i], c[i]}, {i, 1, n - 1}]]];
Table[a[n], {n, 80}] (* A022935 *)
Table[c[n], {n, 80}]
(* Clark Kimberling, May 15 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved