login
A339975
a(n) is the number of 0's minus the number of 1's among the first n terms of A337546.
2
0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0
OFFSET
0,5
COMMENTS
See A339976 for the positions of 0's.
LINKS
FORMULA
a(n) = Sum_{k = 1..n} (-1)^A337546(n).
a(n) = n - 2*Sum_{k = 1..n} A337546(n).
EXAMPLE
For n = 5, the first 5 terms of A337546 are 0, 1, 0, 0, 1, so a(5) = 3 - 2 = 1.
PROG
(C) See Links section.
CROSSREFS
KEYWORD
sign
AUTHOR
Rémy Sigrist, Dec 25 2020
STATUS
approved