User blog:Nayuta Ito/Highly Nested Function

Part1
A is any array. B is any array which doesn't include zero.

$$HNF(x)=x+1$$

$$HNF(A,a,b)=HNF(A,a-1,HNF(A,a,b-1))$$

$$HNF(A,a,0,B)=HNF(A,a-1,HNF(A,a-1,a,B),B)$$