+ 2
How to print this pattern
1 2 15 3 4 5 66 6 7 8 9 10 189 11 12 13
2 ответов
+ 15
you must be having problem for middle column, for that you can make a method to find sum of elements of both sides of middle column & multiply it with 3 to form middle column element(for 1st row it will be 1)
alternatively, middle term will be given by 3n*(2n^2+3) [valid from 2nd row(n=1), except for n=0(1st row) it is 1]
+ 2
middle num = (first + last) * 3 * line
(I am not sure if its 3 because n = 3 or if you always start with 3)
2 + 3 = 5
5 * 3 * 1 = 15
4 + 7 = 11
11 * 3 * 2 = 66
8 + 13 = 21
21 * 3 * 3 = 189