correct manual working for ATC k=2
recursion for each k starts at i=k-1