English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

You know how 5! (5 factorial) is multiplying a series of consecutive intigers? I want to know if there is there a specific term for adding a series of consecutive intigers (1+2+3+4+5). What's the term, and can I program an excel cell to calculate this for an entered value? (entering 17 would give me the sum of 1+2+3...+15+16+17) If so, how?

2006-09-08 12:35:34 · 3 answers · asked by jigokusabre 7 in Computers & Internet Programming & Design

3 answers

This is the Gauss Sum. And u can calculate it with this function:
1+2+3+...+x = 1/2*x*(x+1)
Have fun.

2006-09-08 12:50:20 · answer #1 · answered by Andy K 2 · 1 0

Theres probably a function, but you could program it yourself as using 1/2(x^2+x).
Put the number you want in cell A1
Type the following into the bar at the top for B1:
=1/2*(A1^2+A1)
Copy to the collumn if you need lots.
Hope that helps!

2006-09-08 12:42:34 · answer #2 · answered by tiggeronvrb 3 · 1 0

The addition term is called "factoring" vs "factorials" for multiplication. The excel formula you need is this
A1 is the cell you enter
B1 =sum(c1..c9999)
c1 =if(a1>1,a1,0)
c2 =if(c1>1,c1-1,0)
c3 =if(c2>1,c2-1,0)

In your example, c1=17, c2=16, c17=1, c18=0

2006-09-08 12:47:51 · answer #3 · answered by sethsdadiam 5 · 0 0

fedest.com, questions and answers