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!)
A368624 a(n) = Sum_{k = 1..n} (-1)^(n+k) * gcd(2*k, n). 0

%I #19 Jun 16 2024 15:04:43

%S 1,0,3,4,5,0,7,16,9,0,11,20,13,0,15,48,17,0,19,36,21,0,23,80,25,0,27,

%T 52,29,0,31,128,33,0,35,84,37,0,39,144,41,0,43,84,45,0,47,240,49,0,51,

%U 100,53,0,55,208,57,0,59,180,61,0,63,320,65,0,67,132,69,0

%N a(n) = Sum_{k = 1..n} (-1)^(n+k) * gcd(2*k, n).

%F a(2*n+1) = 2*n + 1; a(4*n+2) = 0; a(4*n) = 4*A344372(n) = 4*Sum_{k = 1..n} gcd(2*k, n).

%p seq(add((-1)^(n+k) * gcd(2*k, n), k = 1..n), n = 1..70)

%t Table[Sum[(-1)^(n+k) GCD[2k,n],{k,n}],{n,70}] (* _Harvey P. Dale_, Jun 16 2024 *)

%Y Cf. A344371, A344372.

%K nonn,easy

%O 1,3

%A _Peter Bala_, Jan 01 2024

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 September 5 13:20 EDT 2024. Contains 375696 sequences. (Running on oeis4.)