I'm trying to figure out the generalized form of the Gaussian n-factorial (n!) formula.

I keep seeing n!= n(n+1)/2 but that's not working.

For example: 5!= 120 but 5(6)/2 or 6(5/2) is 15; a far cry from 120. I don't understand what I'm doing wrong; distributing gives (n^2+n)/2 which is incorrect.

Also the example I saw as the supposed true story used 1-100 and showed it as 101(100/2) = 5050.

What am I missing here?

I don't know where you got that formula, it is obviously wrong.

2!=2*1 which does not equal 2*3/2

There must be a confusion somewhere.

Gauss as a small boy in school was told by his teacher to add numbers from 1 to 100, after which he can play outside. While everyone else was still adding away, he went out and played after about 2 minutes. His teacher was about to punish him when he told the teacher he finished!

When asked how he did it, he answered:
Write the numbers 1-100 and 100-1 one on top of the other and add vertically. We have 100 sums of 101 for two rows, so the sum for one row is 101*100/2=5050.

So probably this 1-100 = 5050 formula became the famous Gauss formula, but not for factorial.

If you are looking for an approximation to the factorial function, i.e. f(n)=n! (approximately), use the Stirling formula.

lim n->∞ n!=√(2πn)(n/e)n.

See:
http://en.wikipedia.org/wiki/Stirling%27s_approximation

I apologize for the confusion. The formula you mentioned, n! = n(n+1)/2, is actually incorrect. The correct formula to calculate the factorial of a number is:

n! = n * (n-1) * (n-2) * ... * 3 * 2 * 1

Let's take the example of 5!:

5! = 5 * 4 * 3 * 2 * 1 = 120

The formula you mentioned, n(n+1)/2, is actually used to calculate the sum of numbers from 1 to n, not the factorial. It is known as the formula for the arithmetic series sum.

To clarify the example you mentioned, where 1-100 is shown as 101(100/2) = 5050, it is actually illustrating the sum of numbers from 1 to 100. In that case, 1 + 2 + 3 + ... + 98 + 99 + 100 = 5050. The formula used here is correct for calculating the sum of an arithmetic series using the formula n(n+1)/2.

To calculate the factorial of a number, you need to multiply all the positive integers from 1 to that number.