|
|
A127792
|
|
a(0)=1; for n>0, a(n) = Sum_{k|n} (number of earlier terms which are coprime to k).
|
|
1
|
|
|
1, 1, 4, 6, 8, 10, 15, 14, 17, 23, 27, 22, 41, 26, 41, 51, 52, 32, 67, 38, 76, 74, 63, 45, 99, 69, 78, 81, 112, 58, 138, 62, 107, 107, 98, 126, 154, 73, 110, 127, 184, 80, 193, 86, 162, 207, 126, 94, 213, 133, 205, 169, 198, 106, 235, 197, 260, 188, 169, 118, 364, 122, 179
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
The positive divisors of 8 are 1,2,4,8. So a(8) = (the number of earlier terms coprime to 1, which is 8) + (the number of earlier terms coprime to 2, which is 3 for a(0)=1, a(1)=1 and a(6) = 15) + (the number of earlier terms coprime to 4, which is 3) + (the number of earlier terms coprime to 8, which is 3) = 8 + 3 + 3 + 3 = 17.
|
|
MATHEMATICA
|
f[l_List] := Block[{n = Length[l], d = Divisors[n], c = 0}, Do[ c += Length[Select[l, GCD[ #, d[[i]]] == 1 &]]; , {i, Length[d]}]; Append[l, c]]; Nest[f, {1}, 64] (* Ray Chandler, Feb 08 2007 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|