OFFSET
1,3
FORMULA
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).
MAPLE
seq(add((-1)^(n+k) * gcd(2*k, n), k = 1..n), n = 1..70)
MATHEMATICA
Table[Sum[(-1)^(n+k) GCD[2k, n], {k, n}], {n, 70}] (* Harvey P. Dale, Jun 16 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Bala, Jan 01 2024
STATUS
approved