The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A344371 a(n) = Sum_{k=1..n} (-1)^(n-k) gcd(k,n). 6

%I #19 Mar 30 2024 03:00:33

%S 1,1,3,4,5,5,7,12,9,9,11,20,13,13,15,32,17,21,19,36,21,21,23,60,25,25,

%T 27,52,29,45,31,80,33,33,35,84,37,37,39,108,41,65,43,84,45,45,47,160,

%U 49,65,51,100,53,81,55,156,57,57,59,180,61,61,63,192,65,105

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

%H Felix Fröhlich, <a href="/A344371/b344371.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = abs(A199084(n)).

%F a(2n+1) = 2n+1.

%F a(2n) = A344372(n) = 2*n - A106475(n-1).

%F Sum_{k=1..n} a(k) ~ (n^2/Pi^2) * (log(n) + 2*gamma - 1/2 - 4*log(2)/3 + Pi^2/4 - zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - _Amiram Eldar_, Mar 30 2024

%o (PARI) a(n) = sum(k=1, n, (-1)^(n-k)*gcd(k,n)); \\ _Michel Marcus_, May 16 2021

%Y Cf. A001620, A090423, A106475, A199084, A306016, A344372, A344373.

%K nonn,easy

%O 1,3

%A _Max Alekseyev_, May 16 2021

%E More terms from _Felix Fröhlich_, May 19 2021

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 June 7 17:05 EDT 2024. Contains 373203 sequences. (Running on oeis4.)