Ahmad Asaad

0xΛrcher — Rustacean 🦀 — Stands with Ghaza 🇵🇸🔻 — Engineering student at Al-Azhar University

Summation of the $n$ natural numbers from $1$ to $n$

Summation of the $n$ natural numbers from $1$ to $n$ can be calculated using this formula:

$$ \sum_{i=1}^{n}i = \frac{n(n+1)}{2} $$

and this formula is the same formula used for calculating the $n$th triangular number:

$$ T_n = \frac{n(n+1)}{2} $$

For example:

  • $ T_1 = \frac{1(1+1)}{2} = 1 $
  • $ T_2 = \frac{2(2+1)}{2} = 1 + 2 = 3 $
  • $ T_3 = \frac{3(3+1)}{2} = 1 + 2 + 3 = 6 $

Hello World!

First post on this blog.

Katex

Inline: $ Hello \enspace World! $

Outline:

$$ Hello \enspace World! $$

Mermaid

    flowchart TD
    A@{ shape: stadium, label: "Start" }
    A --> B@{ shape: lean-r, label: "print \"Hello World!\"" }
    B --> C@{ shape: stadium, label: "Exit" }