Formula - Sum of N Natural numbers.
Defined as a form of arithmetic progression where the sum of n terms are arranged in a sequence with the first term being 1, n being the number of terms along with the nth term. The sum of n natural numbers is represented as [n(n+1)]/2.
Using R in Statistical Programming.
Assign N a # , THEN apply the formula:
n <- 25
n*(n+1)/2
OUTPUT
325
----
325 is the sum of the first 25 integers.
Blog comments