login
A106475
An alternating sum of greatest common divisors.
5
1, 0, 1, -4, 1, -8, 1, -16, -3, -16, 1, -36, 1, -24, -15, -48, 1, -48, 1, -68, -23, -40, 1, -112, -15, -48, -27, -100, 1, -120, 1, -128, -39, -64, -47, -180, 1, -72, -47, -208, 1, -176, 1, -164, -99, -88, 1, -304, -35, -160, -63, -196, 1, -216, -79, -304, -71, -112, 1, -420, 1, -120, -147, -320, -95, -288, 1, -260, -87
OFFSET
0,4
COMMENTS
With interpolated 0's, this is Sum_{k=0..n} gcd(n-k+1,k+1)*(-1)^k.
LINKS
FORMULA
a(n) = Sum_{k=0..2*n} gcd(2*n-k+1, k+1)*(-1)^k.
a(n) = 2(n+1) - A344371(2(n+1)) = 2(n+1) - A344372(n+1) = 2(n+1) + A199084(2(n+1)). - Max Alekseyev, May 16 2021
Sum_{k=1..n} a(k) ~ n^2 * (1 - (4/Pi^2)*(log(n) + 2*gamma - 1/2 - log(2)/3 - zeta'(2)/zeta(2))), where gamma is Euler's constant (A001620). - Amiram Eldar, Mar 30 2024
MATHEMATICA
Table[Sum[GCD[2n-k+1, k+1](-1)^k, {k, 0, 2n}], {n, 0, 100}] (* Giorgos Kalogeropoulos, Mar 31 2021 *)
PROG
(PARI) A106475(n) = sum(k=0, (2*n), gcd(1+n+n-k, k+1)*((-1)^k)); \\ Antti Karttunen, Mar 30 2021
CROSSREFS
Negated bisection of A344373.
Sequence in context: A305834 A295786 A080102 * A376302 A370614 A134829
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 03 2005
EXTENSIONS
More terms from Antti Karttunen, Mar 30 2021
STATUS
approved