Answer
i j output
1 0 0
1 1
2 0 0
2 1 1
2 2
3 0 0
3 1 1
3 2 2
3 3
4 0 0
4 1 1
4 2 2
4 3 3
4 4
(A).
0 0 1 0 1 2 0 1 2 3
________________________________________________
(B).
****
****
2 ****
3 2 ****
4 3 2 ****
________________________________________________
(C).
1xxx2xxx4xxx8xxx16xxx
1xxx2xxx4xxx8xxx
1xxx2xxx4xxx
1xxx2xxx
1xxx
________________________________________________
(D).
1G
1G3G
1G3G5G
1G3G5G7G
1G3G5G7G9G
Work Step by Step
i j output
1 0 0
1 1
2 0 0
2 1 1
2 2
3 0 0
3 1 1
3 2 2
3 3
4 0 0
4 1 1
4 2 2
4 3 3
4 4
(A).
0 0 1 0 1 2 0 1 2 3
________________________________________________
(B).
****
****
2 ****
3 2 ****
4 3 2 ****
________________________________________________
(C).
1xxx2xxx4xxx8xxx16xxx
1xxx2xxx4xxx8xxx
1xxx2xxx4xxx
1xxx2xxx
1xxx
________________________________________________
(D).
1G
1G3G
1G3G5G
1G3G5G7G
1G3G5G7G9G