

A124440


a(n) = sum{n/2<=k<=n, GCD(k,n)=1} k.


3



1, 1, 2, 3, 7, 5, 15, 12, 20, 16, 40, 18, 57, 33, 46, 48, 100, 41, 126, 60, 96, 85, 187, 72, 187, 120, 182, 126, 301, 88, 345, 192, 250, 208, 318, 162, 495, 261, 354, 240, 610, 186, 672, 330, 406, 385, 805, 288, 771, 376, 616, 468, 1027, 365, 830, 504, 774, 616, 1276
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


LINKS

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


FORMULA

For n >=2, a(n) = phi(n)*n/2  A066840(n).


EXAMPLE

The integers which are >= 10/2 and are <= 10 and which are coprime to 10, are 7 and 9. So a(10) = 7 + 9 = 16.


MATHEMATICA

f[n_] := Plus @@ Select[Range[Ceiling[n/2], n], GCD[ #, n] == 1 &]; Table[f[n], {n, 60}] (*Chandler*)


PROG

(PARI) a(n)=if(n>2, eulerphi(n)*n/2, 1) \\ Charles R Greathouse IV, Jul 14 2016


CROSSREFS

Cf. A066840, A124446, A124447.
Sequence in context: A050367 A192175 A059459 * A067363 A083188 A228775
Adjacent sequences: A124437 A124438 A124439 * A124441 A124442 A124443


KEYWORD

nonn


AUTHOR

Leroy Quet, Nov 01 2006


EXTENSIONS

Extended by Ray Chandler, Nov 12 2006


STATUS

approved



