Talk:Friedman's vector reduction problem

Though not as extensive as the code shown in the article, I've made a vastly-condensed version of the vector-reducing Python code. It takes an array as input and outputs how many reductions it takes before the vector remains unchanged. def VR(V): k=0 while sum(V)!=V[-1]: i=-2 while V[i]<1:i-=1 V[i+1]=sum(V) V[i]-=1 k+=1 return k