## Solution.
Let x1,x2,…,xn be the given numbers. For simplicity, denote xn+1=x1 and x−1=xn.
Let c be the sum of all red numbers, and S=c+b+p be the sum of all numbers.
If xi is a red number, then xi−1+xi+1=2xi.
If xi is a white number, then xi−1+xi+1=xi.
If xi is a red number, then xi−1+xi+1=21xi.
Thus, we have written the conditions from the problem as equations that connect three consecutive numbers. 2 points
Consider the sum of all these equations.
If we sum all these equations (for i=1,2,…,n) on the right side of the equation, we will get
2c+b+21p
while on the left side, we will get
i=1∑nxi−1+i=1∑nxi+1=2S=2c+2b+2p
Therefore, 2c+2b+2p=2c+b+21p, 1 point
which simplifies to pb=−23.