login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124440 a(n) = Sum_{n/2<=k<=n, gcd(k,n)=1} k. 7
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

Robert Israel, Table of n, a(n) for n = 1..10000

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.

MAPLE

N:= 100: # for a(1)..a(N)

G:= add(numtheory:-mobius(n)*n*x^(2*n)/((1-x^n)*(1-x^(2*n))^2), n=1..N/2):

S:= series(G, x, N+1):

A66840:= [seq(coeff(S, x, j), j=1..N)]:

f:= proc(n) n*numtheory:-phi(n)/2 - A66840[n] end proc:

f(1):= 1: f(2):= 1:

map(f, [$1..N]); # Robert Israel, Feb 02 2021

MATHEMATICA

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

PROG

(PARI) a(n) = sum(k=ceil(n/2), n, if (gcd(n, k)==1, k)); \\ Michel Marcus, Feb 03 2021

CROSSREFS

Cf. A066840, A124446, A124447.

Sequence in context: A192175 A294205 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 4 12:06 EDT 2022. Contains 357239 sequences. (Running on oeis4.)