A277914 a(n) is the number of zeros minus the number of ones among the first n terms of A076478.
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
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
- Wikipedia, Blancmange curve
Programs
-
Mathematica
Join[{0},Flatten[Array[Accumulate[Flatten[Tuples[{1,-1},#]]]&,5]]] (* Paolo Xausa, Dec 08 2023 *)
Formula
a(n) = Sum_{i=0..n-1} (-1)^A076478(i) for any n>=0.
Comments