Answers
We know the Sum of the First n terms of an Arithmetic Progression which is
n/2[a + (n-1)d]
The given series can be divided into two
There for
4+8+12...16 where a = 4, d= 4
Based on above equation summation of first series will be 16/2[4 + (16-1)4] = 512
similarly
3+5+7+...to 16 where a = 3, d = 2
then summation will be 16/2[3 + (16-1)2] = 264
4+3+8+5+12+7+...to 32 Terms = 4+8+12...to 16 Terms + 3+5+7+...to 16 Terms
so 512 + 264 = 776
our Answer is 776
var = "Python Programming"
Ruby program to add two integer numbers
how to create an array with Array.[](*args) in Ruby ?
What are the various Ruby runtimes, and how are they different?
Ruby program to check whether the given number is prime or not
Ruby program to reverse a string
Ruby program to check whether the given number is palindrome
Ruby program to print Fibonacci series
How to Replace array elements in Ruby?
Ruby program to print an array
Ruby program to check whether the given number is Armstrong
Program to Print Triangle of Numbers in Ruby
How to add/remove elements to Array in Ruby?
How to shuffle an array in Ruby?
Creating Array with Array.new(size, obj) in Ruby
Ruby program to generate random numbers
Ruby program to Calculate the factorial of given number
What are #method_missing and #send? Why are they useful?
How to Sort Array in Ruby?
How to get index of array element in Ruby
How to Get Input with Gets in Ruby
How to create two dimensional array in ruby?