2 = a(k) + a(n-k),
2 = a(k) + a(n+1-k).
2 = a(1) + a(n+1-1) = a(2) + a(n+1-2) = a(3) + a(n+1-3) = ...
s(n) = a(1)+a(2)+a(3)+...+a(n-2)+a(n-1)+a(n)
n=2m时,
s(n)=s(2m)=[a(1)+a(n)] + [a(2)+a(n-1)]+[a(3)+a(n-2)]+...+[a(m-1)+a(m+2)]+[a(m)+a(m+1)]
= 2*m = 2m = n.
n=2m-1时,2 = a(m) + a(2m-1+1-m) = a(m) + a(m),a(m) = 1.
s(n)=s(2m-1)=[a(1)+a(n)]+[a(2)+a(n-1)]+[a(3)+a(n-2)]+...+[a(m-1)+a(m+1)]+a(m)
= 2*(m-1) + 1 = 2m-1 = n.
综合有,s(n) = n.