102
$\begingroup$

Is there a notation for addition form of factorial?

$$5! = 5\times4\times3\times2\times1$$

That's pretty obvious. But I'm wondering what I'd need to use to describe

$$5+4+3+2+1$$

like the factorial $5!$ way.

EDIT: I know about the formula. I want to know if there's a short notation.

$\endgroup$
11
  • 27
    $\begingroup$ $1+2+\dots+n=\dfrac{n(n+1)}{2}$; there's no need for a special notation. $\endgroup$
    – egreg
    Dec 4, 2013 at 23:28
  • 2
    $\begingroup$ Duplicate of: math.stackexchange.com/q/60578/439 $\endgroup$ Dec 4, 2013 at 23:33
  • 2
    $\begingroup$ @NieldeBeaudrap I'm asking about it's notation... $\endgroup$
    – akinuri
    Dec 4, 2013 at 23:36
  • 2
    $\begingroup$ The sigma notation is a notation for it. $\endgroup$
    – user112167
    Dec 4, 2013 at 23:37
  • 4
    $\begingroup$ So, you didn't see the answer which described that Knuth suggested the notation "$n?$" ? $\endgroup$ Dec 4, 2013 at 23:54

4 Answers 4

68
$\begingroup$

It is called the $n$th triangle number and it can be written as $\binom{n+1}2$, as a binomial coefficient.

$\endgroup$
10
  • 3
    $\begingroup$ why would it be called a "triangle number"? $\endgroup$
    – khaverim
    Jun 10, 2016 at 17:01
  • 8
    $\begingroup$ @khaverim Check this image. This is something I've come up with some time ago to visualize and understand how the calculation works. I've literally spent an hour or so to think that, becasuse I had nowhere to look then. And I'm guessing it's called triangle number(s) becase you can treat the number set as the half of a rectangle, a triangle. $\endgroup$
    – akinuri
    Jul 18, 2016 at 21:45
  • 12
    $\begingroup$ Unless I'm misunderstanding the notation, this is not a correct answer. I believe it should be ( ( n ( n + 1 ) ) / 2 ), not ( ( n + 1 ) / 2 ). $\endgroup$ Aug 25, 2017 at 9:37
  • 2
    $\begingroup$ Berci just skipped some details. The notation is called binomial coefficient. $\endgroup$
    – akinuri
    Apr 21, 2018 at 20:11
  • 2
    $\begingroup$ @BenLeggiero it's correct, it's binomial coefficient notation as pointed out by other commenters, not a linear function. It could otherwise be written as C(n+1, 2), n+1C2, etc., and translates as (n+1)!/(2(n-1)!), or n(n+1)/2 $\endgroup$
    – 17slim
    Dec 9, 2020 at 20:26
58
$\begingroup$

That can be done with the formula $\frac{n^2+n}{2}$

$\endgroup$
3
  • $\begingroup$ What about doing the opposite, finding the dimensions using the output number? So far I have floor(sqrt(2 * s)) $\endgroup$ Sep 8, 2020 at 21:57
  • 1
    $\begingroup$ If the output is, say $y$ then you need to solve $n^2+n=2y$ or $(n+0.5)^2=2y+0.25$. Take square root and hope for an integer answer $\endgroup$
    – imranfat
    Sep 9, 2020 at 13:55
  • $\begingroup$ This one fitted perfect for py3 N = int(input()) for i in range(1,N+1): sum = ((i**2)+i)/2 print(int(sum)) $\endgroup$
    – MichaelR
    Jun 8, 2022 at 9:46
26
$\begingroup$

We should also note that the factorial function has a similar look to it as the sigma summation notation; as $$\frac{n(n+1)}{2}=1+2+3+...+n=\sum_{k=1}^nk$$ $$n!=1 \cdot 2 \cdot 3 \cdot ... \cdot n=\prod_{k=1}^nk$$

$\endgroup$
15
$\begingroup$

$\sum_{n=1}^{k} n = 1 +2+3+\ldots+k$. Is a nice notation for it. So $$1 + 2 + 3 + 4 + 5 = \sum_{n=1}^{5} n$$.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .