Mean - Median Map

Write a module that takes a list of values and returns the next value computed by the mean-median map.

nextVal[vals_]:=Module[{n=Length[vals],next},
next = (n+1)*Median[vals]-Total[vals];
next
]

Try it out:

nextVal[{3,10,11}]

nextVal[{3,10,11,16}]

Write another module to return the sequence of starting values.

computeSeq[vals_,k_]:=Module[{newseq=vals},
Do[
AppendTo[newseq, nextVal[newseq]]
,k];
newseq
]

myseq=computeSeq[{3,10,11},100]

ListPlot[myseq,PlotRange->All]

Question: What if you compute the sequence of medians?

Plot the sequence of medians:

medians=Table[ Median[ myseq[[;;k]] ], {k,1,Length[myseq]}]

ListPlot[medians]