OFFSET
0,3
EXAMPLE
Among terms a(0),a(1),...a(8) there are 5 terms coprime to 9*10/2 = 45. (These terms are a(0)=1, a(1)=1, a(2)=2, a(3)=2 and a(4)=2.) So a(9) = 5.
MATHEMATICA
f[l_List] := Block[{n = Length[l]}, Append[l, Length @ Select[l, GCD[n*(n + 1)/2, # ] == 1 &]]]; Nest[f, {1}, 80] (* Ray Chandler, Jun 29 2008 *)
a[0] = 1; a[n_] := a[n] = Count[ GCD[ Table[ a[i], {i, 0, n - 1}], n(n + 1)/2], 1]; Table[ a[n], {n, 0, 77}] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 22 2006
EXTENSIONS
Extended by Ray Chandler and Robert G. Wilson v, Nov 23 2006
STATUS
approved