[go: up one dir, main page]

login
A277914
a(n) is the number of zeros minus the number of ones among the first n terms of A076478.
2
0, 1, 0, 1, 2, 3, 2, 1, 2, 1, 0, 1, 2, 3, 4, 5, 4, 5, 4, 5, 6, 5, 4, 3, 4, 5, 4, 5, 4, 3, 2, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 7, 8, 7, 8, 9, 10, 9, 8, 9, 8, 9, 10, 11, 10, 11, 10, 11, 10, 9, 10, 11, 10, 9, 8, 7, 8, 9, 10, 9, 10, 11, 10, 9, 10, 9, 10, 9, 10
OFFSET
0,5
COMMENTS
A036799 gives the positions of zeros in this sequence.
Between two zeros, the graph of the sequence looks like a Takagi (or blancmange) curve.
LINKS
FORMULA
a(n) = Sum_{i=0..n-1} (-1)^A076478(i) for any n>=0.
MATHEMATICA
Join[{0}, Flatten[Array[Accumulate[Flatten[Tuples[{1, -1}, #]]]&, 5]]] (* Paolo Xausa, Dec 08 2023 *)
CROSSREFS
Sequence in context: A154556 A260228 A316657 * A126626 A137927 A321864
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 03 2016
STATUS
approved