

A124386


For all n >= 2, Sum_{2<=k<=n, gcd(k,n)>1} a(k) = n. a(1)=1.


1



1, 2, 3, 2, 5, 1, 7, 5, 7, 3, 11, 3, 13, 5, 7, 9, 17, 15, 19, 7, 11, 3, 23, 15, 9, 17, 33, 3, 29, 55, 31, 77, 47, 15, 45, 89, 37, 91, 79, 45, 41, 171, 43, 183, 189, 37, 47, 351, 155, 123, 373, 165, 53, 655, 471, 533, 553, 191, 59, 859, 61, 861, 233, 33, 839, 1073, 67, 687, 1761, 637, 71
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

Table of n, a(n) for n=1..71.


EXAMPLE

The positive integers which are <= 12 and are not coprime to 12 are 2,3,4,6,8,9,10,12. And a(12) is such that a(2)+a(3)+a(4)+a(6)+a(8)+a(9)+a(10)+a(12) = 12.


MATHEMATICA

f[n_] := Select[Range[2, n], GCD[ #, n] > 1 &]; g[l_] := Block[{n = Length[l] + 1}, Append[l, n  Plus @@ l[[Most[f[n]]]]]]; Nest[g, {1}, 70] (* Ray Chandler, Nov 13 2006 *)


CROSSREFS

Cf. A124385.
Sequence in context: A157449 A053139 A127705 * A098668 A112763 A093476
Adjacent sequences: A124383 A124384 A124385 * A124387 A124388 A124389


KEYWORD

sign


AUTHOR

Leroy Quet, Oct 29 2006


EXTENSIONS

Extended by Ray Chandler, Nov 13 2006


STATUS

approved



