OFFSET
1,8
COMMENTS
The usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception.
For all n, a(n) >= -1. Equality holds for n = 2 and n = 2*p for an odd prime p.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
Pruthviraj et al., Is it always true that Sum_{i=1..a-1}(-1)^i(a,i) >= -1 ?, 2021.
FORMULA
MATHEMATICA
Array[Sum[(-1)^k GCD[k, #], {k, # - 1}] &, 90] (* Michael De Vlieger, May 16 2021 *)
PROG
(PARI) A344373(n) = sum(k=1, n-1, ((-1)^k)*gcd(k, n)); \\ Antti Karttunen, May 16 2021
CROSSREFS
KEYWORD
AUTHOR
Max Alekseyev, May 16 2021
EXTENSIONS
More terms from Antti Karttunen, May 16 2021
STATUS
approved