Program to find the sum of the series 23 + 45 + 75 + ... . . upto N terms | Java program to find sum upto N - th term of the series : 23 , 45 , 75 , 113. . . ; return the final sum ; Driver program ; Get the value of N ; Get the sum of the series
import java . util . * ; class solution { static int findSum ( int N ) { return ( 2 * N * ( N + 1 ) * ( 4 * N + 17 ) + 54 * N ) / 6 ; } public static void main ( String arr [ ] ) { int N = 4 ; System . out . println ( findSum ( N ) ) ; } }