In an algorithm, in each level, I have two corresponding matrices in a way one of them has 4 times more element than the other. like children and parent, but i need to have the corresponding elements. consider the two following indices as an example for a level

```
1 5 9  13
2 6 10 14   and  1 3
3 7 11 15        2 4
4 8 12 16    

```

so for example, I want to receive the element by the index of 1 from the second matrix when i have each of 1,2,5,6 element indices from the first matrix or 2 when i have 3,4,7,8 or 3 for 9,10,16,14 and so on. how can i do that?

as an another example for another level: 

```
1 9  17 25 33 41 49 57
2 10 18 26 34 42 50 58
3 11 19 27 35 43 51 59  and  1 5 9  13
4 12 20 28 36 44 52 60       2 6 10 14
5 13 21 29 37 45 53 61       3 7 11 15
6 14 22 30 38 46 54 62       4 8 12 16
7 15 23 31 39 47 55 63
8 16 24 32 40 48 56 64

```