Here we are given d-ary..
We need to find the j^{th} child of i^{th} node.
Before coming to the 1st child of the i^{th} node, all the nodes starting from root to the last child of (i-1)^{th} node has to be covered.
Indexing starts from 1.
Last child of A[1] is at index : 1+d
Last child of A[2] is at index : (1+d) + d =1 +2d
Last child of A[3] is at index : ((1+d) + d) + d =1 + 3d
Last child of A[k] is at index : (1+d) + (k-1)d =d+1+kd-d= 1 +kd
So, last child of A[i-1] is at index : 1+ (i-1)d
We have reached the last child of the (i-1)^{th} node.
Now we need to find j^{th} child of the i^{th} node. So simply add j it becomes d(i-1) + j + 1