OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..3125
EXAMPLE
The terms of the sequence, among terms a(0) through a(7), which are coprime to 8 are a(0)=1, a(2)=3 and a(6) = 23. So a(8) = a(7) +1 +3 +23 = 117.
MAPLE
R:= [1]:
for n from 1 to 100 do
x:= R[-1] + convert(select(t -> igcd(t, n)=1, R), `+`);
R:= [op(R), x];
od:
R; # Robert Israel, Sep 15 2020
MATHEMATICA
f[l_List] := Append[l, l[[ -1]] + Plus @@ Select[l, GCD[ #, Length[l]] == 1 &]]; Nest[f, {1}, 32] (* Ray Chandler, Jan 06 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 04 2007
EXTENSIONS
Extended by Ray Chandler, Jan 06 2007
STATUS
approved