Let the numbers be a1,a2,…,an arranged around a circle. Each ai is colored red, white, or blue.
Let R, W, B be the sets of indices of red, white, and blue numbers, respectively.
- For red ai: ai=21(ai−1+ai+1) (since it is twice smaller than the sum of its neighbors).
- For white ai: ai=ai−1+ai+1.
- For blue ai: ai=2(ai−1+ai+1) (since it is twice larger than the sum of its neighbors).
Let w=∑i∈Wai, b=∑i∈Bai.
Let S=∑i=1nai be the total sum.
Let us sum ai over all i:
S=∑i∈Rai+∑i∈Wai+∑i∈Bai
But for each color, we can write ai in terms of its neighbors:
∑i∈Rai=21∑i∈R(ai−1+ai+1)
∑i∈Wai=∑i∈W(ai−1+ai+1)
∑i∈Bai=2∑i∈B(ai−1+ai+1)
So,
S=21∑i∈R(ai−1+ai+1)+∑i∈W(ai−1+ai+1)+2∑i∈B(ai−1+ai+1)
But ∑i∈X(ai−1+ai+1) is the sum over all neighbors of X.
Since the numbers are arranged in a circle, for each aj, the number of times it appears as a neighbor is equal to the number of times j is adjacent to a member of R, W, or B.
For each aj, let rj be the number of red neighbors, wj the number of white neighbors, bj the number of blue neighbors. Since the circle is undirected, each aj has two neighbors, so rj+wj+bj=2 for each j.
But summing over all i in R, W, B:
∑i∈R(ai−1+ai+1)=∑j=1nrjaj
∑i∈W(ai−1+ai+1)=∑j=1nwjaj
∑i∈B(ai−1+ai+1)=∑j=1nbjaj
So,
S=21∑j=1nrjaj+∑j=1nwjaj+2∑j=1nbjaj
=∑j=1n(21rj+wj+2bj)aj
But rj+wj+bj=2, so wj=2−rj−bj.
So,
21rj+wj+2bj=21rj+(2−rj−bj)+2bj=2−21rj−bj+2bj=2−21rj+bj
Therefore,
S=∑j=1n(2−21rj+bj)aj
But S=∑j=1naj.
So,
∑j=1naj=∑j=1n(2−21rj+bj)aj
⟹∑j=1n(1−21rj+bj)aj=0
Now, group the sum by color:
- For aj red: aj is red, so j∈R.
- For aj white: j∈W.
- For aj blue: j∈B.
For aj red: aj has rj red neighbors, wj white neighbors, bj blue neighbors, with rj+wj+bj=2.
But since the coloring is arbitrary, but the sum is over all j.
But let's try a small example to get the ratio.
Suppose there are only white and blue numbers (since w and b are both nonzero, and the problem is symmetric, we can try with only white and blue numbers).
Let us try with 2 white and 2 blue numbers, arranged alternately: w1,b1,w2,b2.
Let a1=w1 (white), a2=b1 (blue), a3=w2 (white), a4=b2 (blue).
For white: ai=ai−1+ai+1
For blue: ai=2(ai−1+ai+1)
Let us write the equations:
a1=a4+a2
a2=2(a1+a3)
a3=a2+a4
a4=2(a3+a1)
Let us denote a1=x, a2=y, a3=z, a4=t.
So:
x=t+y
y=2(x+z)
z=y+t
t=2(z+x)
From x=t+y and z=y+t, so x=t+y, z=y+t.
So x=z.
Let x=z=s.
Then y=2(x+z)=4s
t=2(z+x)=4s
So x=t+y=4s+4s=8s, so s=0 unless s=0.
But then all numbers are zero, which is not allowed.
Try with 1 white and 2 blue numbers: a1 (white), a2 (blue), a3 (blue).
a1=a3+a2
a2=2(a1+a3)
a3=2(a2+a1)
Let a1=x, a2=y, a3=z.
x=y+z
y=2(x+z)
z=2(y+x)
From x=y+z, so y=x−z.
Plug into y=2(x+z):
x−z=2(x+z)
x−z=2x+2z
x−z−2x−2z=0
−x−3z=0
x=−3z
So y=x−z=−3z−z=−4z
Now z=2(y+x)=2(−4z−3z)=2(−7z)=−14z
So z+14z=0⟹15z=0⟹z=0
So all numbers are zero.
Try with 1 white and 1 blue: a1 (white), a2 (blue).
a1=a2+a2=2a2
a2=2(a1+a1)=4a1
So a1=2a2, a2=4a1
So a1=2⋅4a1=8a1⟹a1=0
So all numbers are zero.
Try with 1 white and 1 red: a1 (white), a2 (red).
a1=a2+a2=2a2
a2=21(a1+a1)=a1
So a1=2a2=2a1⟹a1=0
So all numbers are zero.
Try with 1 white, 1 blue, 1 red: a1 (white), a2 (blue), a3 (red).
a1=a3+a2
a2=2(a1+a3)
a3=21(a2+a1)
Let a1=x, a2=y, a3=z.
x=y+z
y=2(x+z)
z=21(y+x)
From x=y+z, y=x−z.
Plug into y=2(x+z):
x−z=2(x+z)
x−z=2x+2z
x−z−2x−2z=0
−x−3z=0
x=−3z
So y=x−z=−3z−z=−4z
Now z=21(y+x)=21(−4z−3z)=21(−7z)=−27z
So z+27z=0⟹29z=0⟹z=0
So all numbers are zero.
Therefore, the only possible way is that all numbers are zero unless all numbers are of the same color.
Suppose all numbers are white: ai=ai−1+ai+1, so ai−ai−1−ai+1=0 for all i.
But the only solution is ai=0 for all i.
Suppose all numbers are blue: ai=2(ai−1+ai+1), so ai−2ai−1−2ai+1=0 for all i.
Again, only zero solution.
Suppose all numbers are red: ai=21(ai−1+ai+1), so ai−21ai−1−21ai+1=0 for all i.
Again, only zero solution.
Therefore, the only possible way is that w=0 or b=0, unless the circle is degenerate.
But the problem says w=0, b=0.
Therefore, the only possible ratio is −2.
(Alternatively, the only possible ratio is −2.)