8 6 8 7 9

(8+6, 6+8, 8+7, 7+9)
( 14, 14, 15, 16)
5 , 5 , 6, 7 like this


8 6 8 7 9
5, 5, 6, 7
1, 2, 4
3, 6
9





i want a php code for this logic.... any one please help meeee