grow(t) = { my (tt=vector(vecsum(t)), u=vector(ceil(vecmax(t)/2)), m=0); for (n=1, #t, for (k=1, t[n], d = min(k, t[n]+1-k); tt[m++] = u[d]++ ); ); tt } t=[1,2,3] while (#t < 10 000, t=grow(t)) for (n=1, 10 000, print (n " " t[n])) quit