This is a logical problem and I can't solve it. The problem goes like this:
There is a series of numbers: $$3, 2, 1, 5$$
There is four ways to add the consecutive terms to have a number that is divided by 3 without leaving remainder (3 1 5 is not consecutive so it doesn't count):
- 3, that sums up 3.
- 3 2 1, that sums up 6.
- 2 1, that sums up 3.
- 1 5, that sums up 6.
There is another series that is: $$6, 1, 4, 124, 3, 6, 512, 3, 1, 33, 2, 2, 32, 100, 813, 4, 41, 1, 3, 8, 213, 5, 7, 61, 8, 42, 1, 4, 2, 20, 8$$
How many ways are there to sum up consecutive numbers that are divided by three?
It's there some trick? Fastest way to solve it?
Admittedly, I can't think of a solution that doesn't involve at least some tedium. However, I can at least think of a way to simplify the series itself and the approach. Do you know of modular arithmetic? If we take each of those numbers mod 3, that means we consider their remainder after being divided by 3, either 0, 1, or 2. If two numbers have the same such remainder, we say that they are congruent modulo 3. For example, $6 \cong 0 (mod 3)$. Or $101 \cong -1 (mod 3)$. Congruence comes from something called equivalence relations, which you don't need to understand, but is something very useful to know.
The example you gave can be rewritten as
$0, 2, 1, 2$
or
$0,-1,1,-1$.
We still want to sum up the numbers to get a multiple of 3, but it's much simpler to look at now. We also know a few things by looking at it this way:
1) We can add a multiple of $3$ to any sequence and still have a multiple of $3$, since it's just adding $0 mod 3$.
2) Numbers congruent $1$ and numbers congruent $2$ "cancel out" in the sense that their sum will be a multiple of $3$.
3) Having $3$ $1$s or $3$ $-1$s will cancel themselves out. In face, we can say that the difference between the number of $1$s we have and the number of $-1$s we have must be a multiple of 3.
From there, I think it's just tedium, though you could write a computer program to do it for you, but that's a different matter.