login
A127076
a(0)=1. a(n) = a(n-1) + (sum of the earlier terms {among terms a(0) through a(n-1)} which are coprime to n).
2
1, 2, 3, 6, 10, 22, 23, 90, 117, 175, 319, 746, 1264, 3925, 8313, 10690, 23566, 64525, 133493, 380783, 903835, 2427039, 6349271, 16657466, 24493816, 74970066, 84860988, 133884920, 144156567, 630996725, 637860615, 2396049996, 3819335725
OFFSET
0,2
LINKS
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
Cf. A127075.
Sequence in context: A036650 A049889 A014270 * A137208 A049527 A074371
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 04 2007
EXTENSIONS
Extended by Ray Chandler, Jan 06 2007
STATUS
approved