#"Sum of 5th and 7th terms = " 38#
#"Sum of first 15 terms = " 375#
#"To find sum of 16th to 30th terms"#
#a_5 + a_7 = 38#
#a_5 = a_1 + (5-1) * d#
#a_n = a_1 + (7-1) * d #
#a_5 + a_7 = 2 a_1 + 10 d #
#38 = 2 a_1 + 10d#
#19 = a_1 + 5d, " Eqn 1"#
#S_n = (n * (a_1 + a_n) ) / 2#
#S_15 = (15 * (a_1 + (a_1 + (15-1) * d))) / 2#
#375 = (30 a_1 + 210 d) / 2 = 15 a_1 + 105 d#
#25 = a_1 + 7 d, " Eqn 2"#
Solving Equations 1 & 2,
#a_1 = 4, d = 3#
#a_30 = a_1 + (30-1) * d#
#a_30 = 4 + 29*3 = 91#
#"Sum of first 30 terms " S_30 = (30 * (a_1 + a_30)) / 2#
#S_30 = (30 * (4 + 91)) / 2 = 1425#
#"Sum of 16th to 30th terms " = S_30 - S_15 = 1425 -375 = 1050#