|
|
A127075
|
|
a(1)=1. a(n) = a(n-1) + (sum of the earlier terms {among terms a(1) through a(n-1)} which are coprime to n).
|
|
2
|
|
|
1, 2, 5, 11, 25, 67, 178, 287, 863, 2092, 5612, 6871, 22885, 53613, 69597, 223822, 385931, 802877, 2308019, 5936156, 12937623, 29456690, 81587807, 166703456, 437728341, 973247233, 2233938123, 4919445412, 13784085189, 14842425156
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The terms of the sequence, among terms a(1) through a(5), which are coprime to 6 are a(1)=1, a(3)=5, a(4)=11 and a(5)=25. So a(6) = a(5) +1 +5 +11 +25 = 67.
|
|
MAPLE
|
A[1]:= 1:
for n from 2 to 100 do
A[n]:= A[n-1]+convert(select(t -> igcd(t, n)=1, [seq(A[i], i=1..n-1)]), `+`)
od:
|
|
MATHEMATICA
|
f[l_List] := Append[l, l[[ -1]] + Plus @@ Select[l, GCD[ #, Length[l] + 1] == 1 &]]; Nest[f, {1}, 30] (* Ray Chandler, Jan 06 2007 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|