This site is supported by donations to The OEIS Foundation.

Template:Highlighted number triangle

From OeisWiki
Jump to: navigation, search

The {{highlighted number triangle}} OEIS Wiki utility template creates a number triangle, either equilateral (default) or rectangular. With this template, you may highlight: a row, a column [of rectangular triangle], the central coefficients, a downwards diagonal, a single [or all] downwards slope 1/2 diagonal[s], an upwards diagonal or a single [or all] upwards slope 1/2 diagonal[s].

To do

See User talk:Olivier Gérard#Template for number triangles.

Usage

{{highlighted number triangle
| rows = 
| title = 
| type =
| rows count =
| sep = 
| start row = | start column = | indices = 
| float = 
| style =
| cell style =
| row sums =
| f(n) =
| highlight style = 
| second highlight style = 
| highlight = 
}}

Parameters:

  • rows: data entries of the number triangle

Optional parameters:

  • title: title to show above the number triangle
  • type: equi, rect (default: equi)
    (default: Equilateral number triangle for type = equi; Rectangular number triangle for type = rect)
  • sep: separator for data entries in a row (default: ;) (Use twice at end of each row.)
  • rows count: number of rows to display (default: 12; maximum 12)
  • sep: separator for data entries in a row (default: ;) (Use twice at end of each row.)
  • start row: initial row index (default: 0)
  • start column: initial column index (default: 0)
  • indices: both, rows, columns, neither (default: both)
  • float: left, center, right (default: center)
  • style: (default: font-family: serif;)
  • cell style: (default: background: #DDDDDD; color: black;)
  • row sums: yes or no (default: yes)
  • f(n): row sums function (preceded by either tex: or htm: as prefix, defaults to tex:)
  • highlight style: (default: background: #AAAAAA; color: black;)
  • second highlight style: used with e or v for highlight (default: background: #777777; color: white;)
  • highlight: one item chosen from:
    • r0 to r11 (highlight single row)
    • c0 to c11 (highlight single column) [as per rectangular triangle]
    • central (highlight central coefficients) [as per equilateral triangle]
    • d0 to d11 (highlight single downwards diagonal) [as per equilateral triangle]
    • e0 to e11 (highlight single downwards slope 1/2 diagonal) [as per equilateral triangle]
    • e (highlight downwards slope 1/2 diagonals) [as per equilateral triangle]
    • u0 to u11 (highlight single upwards diagonal) [as per equilateral triangle]
    • v0 to v11 (highlight single upwards slope 1/2 diagonal) [as per equilateral triangle]
    • v (highlight upwards slope 1/2 diagonals) [as per equilateral triangle]

Examples

The code

{{highlighted number triangle
| float = left
| title = 
| type = whatever 
| rows =

0 ;; 0 ; 1 ;; 0 ; 1 ; 2 ;; 0 ; 1 ; 2 ; 3 ;; 0 ; 1 ; 2 ; 3 ; 4 ;;

| row sums = no
| f(n) = <!-- t_n -->
| highlight style = background: red; color: yellow; 
| highlight = d2 
}}
Yadda yadda... {{clear}}

yields


0   0  
1   0 1  
2   0 1 2  
3   0 1 2 3  
4   0 1 2 3 4  
5  
6    
7    
8    
9    
10  
11    

0
1
2
3
4
5
6
7
8
9
10
11  

Yadda yadda...

The code

{{highlighted number triangle
| title = 
| type = equi
| rows =

0 ;; 0 ; 1 ;; 0 ; 1 ; 2 ;; 0 ; 1 ; 2 ; 3 ;; 0 ; 1 ; 2 ; 3 ; 4 ;;

| start row = 2 | start column = 0
| rows count = 5
| row sums = yes
| f(n) = htm:
| highlight style = background: red; color: yellow; 
| highlight = d2 
}}

yields

n
       
n   −  2

m  = 0
T  (n, m)

2   0  
0
3   0 1  
1
4   0 1 2  
3
5   0 1 2 3  
6
6   0 1 2 3 4  
10

0
1
2
3
4  

The code

{{highlighted number triangle
| title = 
| type = equi
| rows =

0 ;; 0 ; 1 ;; 0 ; 1 ; 2 ;; 0 ; 1 ; 2 ; 3 ;; 0 ; 1 ; 2 ; 3 ; 4 ;;

| start row = 3 | start column = 1
| rows count = 5
| row sums = yes
| f(n) = htm:
| highlight style = background: red; color: yellow; 
| highlight = d2 
}}

yields

n
       
n   −  2

m  = 1
T  (n, m)

3   0  
0
4   0 1  
1
5   0 1 2  
3
6   0 1 2 3  
6
7   0 1 2 3 4  
10

1
2
3
4
5  

The code

{{highlighted number triangle
| float = left
| title =  
| rows =

0 ;;
0 ; 1 ;;
0 ; 1 ; 2 ;;
0 ; 1 ; 2 ; 3 ;;
0 ; 1 ; 2 ; 3 ; 4 ;;

| rows count = 4
| indices = no
| style = font-family: sans-serif; font-size: 0.75em; 
| cell style = background: black; color: white;
| f(n) = t_n 
| highlight style = background: red; color: yellow; 
| highlight = u1 
}}
{{highlighted number triangle
| float = right
| title =  
| rows =

0 ;;
0 ; 1 ;;
0 ; 1 ; 2 ;;
0 ; 1 ; 2 ; 3 ;;
0 ; 1 ; 2 ; 3 ; 4 ;;

| rows count = 4
| indices = rows
| style = font-family: sans-serif; font-size: 0.75em; 
| cell style = background: black; color: white;
| f(n) = t_n 
| highlight style = background: red; color: yellow; 
| highlight = d1 
}}
{{highlighted number triangle
| float = center
| title =  
| rows =

0 ;;
0 ; 1 ;;
0 ; 1 ; 2 ;;
0 ; 1 ; 2 ; 3 ;;
0 ; 1 ; 2 ; 3 ; 4 ;;

| rows count = 4
| indices = columns
| style = font-family: sans-serif; font-size: 0.75em; 
| cell style = background: black; color: white;
| f(n) = t_n 
| highlight style = background: red; color: yellow; 
| highlight = r1 
}}

yields

       
  0  
0
  0 1  
1
  0 1 2  
3
  0 1 2 3  
6




 
       
0   0  
0
1   0 1  
1
2   0 1 2  
3
3   0 1 2 3  
6




 
       
  0  
0
  0 1  
1
  0 1 2  
3
  0 1 2 3  
6

0
1
2
3  

The code

{{highlighted number triangle
| title =  
| rows =

0 ;;
0 ; 1 ;;
0 ; 1 ; 2 ;;
0 ; 1 ; 2 ; 3 ;;
0 ; 1 ; 2 ; 3 ; 4 ;;

| f(n) = htm: ''t''{{sub|''n''}} 
| type = rect 
| highlight = c1 
}}

yields

n
       
tn

0   0  
0
1   0 1  
1
2   0 1 2  
3
3   0 1 2 3  
6
4   0 1 2 3 4  
10
5  
0
6    
0
7    
0
8    
0
9    
0
10  
0
11    
0

0
1
2
3
4
5
6
7
8
9
10
11  

The code

{{highlighted number triangle
| title = Test 
| rows =

0 ;;
0 ; 1 ;;
0 ; 1 ; 2 ;;
0 ; 1 ; 2 ; 3 ;;
0 ; 1 ; 2 ; 3 ; 4 ;;

| rows count = 5
| f(n) = htm: ''t''{{sub|''n''}} 
}}

yields

Test
n
       
tn

0   0  
0
1   0 1  
1
2   0 1 2  
3
3   0 1 2 3  
6
4   0 1 2 3 4  
10

0
1
2
3
4  

The code

{{highlighted number triangle
| title = Pascal's triangle 
| rows =

    1 ,,
    1 ,    1 ,,
    1 ,    2 ,     1 ,,
    1 ,    3 ,     3 ,     1 ,,
    1 ,    4 ,     6 ,     4 ,     1 ,,
    1 ,    5 ,    10 ,    10 ,     5 ,     1 ,,
    1 ,    6 ,    15 ,    20 ,    15 ,     6 ,     1 ,,
    1 ,    7 ,    21 ,    35 ,    35 ,    21 ,     7 ,     1 ,,
    1 ,    8 ,    28 ,    56 ,    70 ,    56 ,    28 ,     8 ,     1 ,,
    1 ,    9 ,    36 ,    84 ,   126 ,   126 ,    84 ,    36 ,     9 ,     1 ,,
    1 ,   10 ,    45 ,   120 ,   210 ,   252 ,   210 ,   120 ,    45 ,    10 ,     1 ,,
    1 ,	  11 , 	  55 ,   165 ,   330 ,   462 ,   462 ,   330 ,   165 ,    55 ,    11 ,     1 ,,
    1 ,	  12 ,	  66 ,	 220 ,	 495 ,	 792 ,	 924 ,	 792 ,	 495 ,	 220 ,	  66 ,	  12 ,	   1 ,,	 
    1 ,	  13 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  13 ,	   1 ,,
    1 ,	  14 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  14 ,	   1 ,,
    1 ,	  15 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  15 ,	   1 ,,

| sep = ,
| rows count = 12
| f(n) = htm: 2{{^|''n''}}
| highlight = central 
}}

yields

Pascal's triangle
n
       
2n

0   1  
1
1   1 1  
2
2   1 2 1  
4
3   1 3 3 1  
8
4   1 4 6 4 1  
16
5 1 5 10 10 5 1  
32
6   1 6 15 20 15 6 1  
64
7   1 7 21 35 35 21 7 1  
128
8   1 8 28 56 70 56 28 8 1  
256
9   1 9 36 84 126 126 84 36 9 1  
512
10 1 10 45 120 210 252 210 120 45 10 1  
1024
11   1 11 55 165 330 462 462 330 165 55 11 1  
2048

0
1
2
3
4
5
6
7
8
9
10
11  

The code

{{highlighted number triangle
| title = Pascal's triangle 
| rows =

    1 ,,
    1 ,    1 ,,
    1 ,    2 ,     1 ,,
    1 ,    3 ,     3 ,     1 ,,
    1 ,    4 ,     6 ,     4 ,     1 ,,
    1 ,    5 ,    10 ,    10 ,     5 ,     1 ,,
    1 ,    6 ,    15 ,    20 ,    15 ,     6 ,     1 ,,
    1 ,    7 ,    21 ,    35 ,    35 ,    21 ,     7 ,     1 ,,
    1 ,    8 ,    28 ,    56 ,    70 ,    56 ,    28 ,     8 ,     1 ,,
    1 ,    9 ,    36 ,    84 ,   126 ,   126 ,    84 ,    36 ,     9 ,     1 ,,
    1 ,   10 ,    45 ,   120 ,   210 ,   252 ,   210 ,   120 ,    45 ,    10 ,     1 ,,
    1 ,	  11 , 	  55 ,   165 ,   330 ,   462 ,   462 ,   330 ,   165 ,    55 ,    11 ,     1 ,,
    1 ,	  12 ,	  66 ,	 220 ,	 495 ,	 792 ,	 924 ,	 792 ,	 495 ,	 220 ,	  66 ,	  12 ,	   1 ,,	 
    1 ,	  13 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  13 ,	   1 ,,
    1 ,	  14 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  14 ,	   1 ,,
    1 ,	  15 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  15 ,	   1 ,,

| sep = ,
| rows count = 12
| f(n) = htm: 2{{^|''n''}}
| type = equi
| highlight = v11
}}

yields

Pascal's triangle
n
       
2n

0   1  
1
1   1 1  
2
2   1 2 1  
4
3   1 3 3 1  
8
4   1 4 6 4 1  
16
5 1 5 10 10 5 1  
32
6   1 6 15 20 15 6 1  
64
7   1 7 21 35 35 21 7 1  
128
8   1 8 28 56 70 56 28 8 1  
256
9   1 9 36 84 126 126 84 36 9 1  
512
10 1 10 45 120 210 252 210 120 45 10 1  
1024
11   1 11 55 165 330 462 462 330 165 55 11 1  
2048

0
1
2
3
4
5
6
7
8
9
10
11  

The code

{{highlighted number triangle
| title = Pascal's triangle 
| rows =

    1 ,,
    1 ,    1 ,,
    1 ,    2 ,     1 ,,
    1 ,    3 ,     3 ,     1 ,,
    1 ,    4 ,     6 ,     4 ,     1 ,,
    1 ,    5 ,    10 ,    10 ,     5 ,     1 ,,
    1 ,    6 ,    15 ,    20 ,    15 ,     6 ,     1 ,,
    1 ,    7 ,    21 ,    35 ,    35 ,    21 ,     7 ,     1 ,,
    1 ,    8 ,    28 ,    56 ,    70 ,    56 ,    28 ,     8 ,     1 ,,
    1 ,    9 ,    36 ,    84 ,   126 ,   126 ,    84 ,    36 ,     9 ,     1 ,,
    1 ,   10 ,    45 ,   120 ,   210 ,   252 ,   210 ,   120 ,    45 ,    10 ,     1 ,,
    1 ,	  11 , 	  55 ,   165 ,   330 ,   462 ,   462 ,   330 ,   165 ,    55 ,    11 ,     1 ,,
    1 ,	  12 ,	  66 ,	 220 ,	 495 ,	 792 ,	 924 ,	 792 ,	 495 ,	 220 ,	  66 ,	  12 ,	   1 ,,	 
    1 ,	  13 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  13 ,	   1 ,,
    1 ,	  14 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  14 ,	   1 ,,
    1 ,	  15 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  15 ,	   1 ,,

| sep = ,
| rows count = 12
| f(n) = htm: 2{{^|''n''}}
| type = equi
| highlight = e11
}}

yields

Pascal's triangle
n
       
2n

0   1  
1
1   1 1  
2
2   1 2 1  
4
3   1 3 3 1  
8
4   1 4 6 4 1  
16
5 1 5 10 10 5 1  
32
6   1 6 15 20 15 6 1  
64
7   1 7 21 35 35 21 7 1  
128
8   1 8 28 56 70 56 28 8 1  
256
9   1 9 36 84 126 126 84 36 9 1  
512
10 1 10 45 120 210 252 210 120 45 10 1  
1024
11   1 11 55 165 330 462 462 330 165 55 11 1  
2048

0
1
2
3
4
5
6
7
8
9
10
11  

The code

{{highlighted number triangle
| title = Pascal's triangle 
| rows =

    1 ,,
    1 ,    1 ,,
    1 ,    2 ,     1 ,,
    1 ,    3 ,     3 ,     1 ,,
    1 ,    4 ,     6 ,     4 ,     1 ,,
    1 ,    5 ,    10 ,    10 ,     5 ,     1 ,,
    1 ,    6 ,    15 ,    20 ,    15 ,     6 ,     1 ,,
    1 ,    7 ,    21 ,    35 ,    35 ,    21 ,     7 ,     1 ,,
    1 ,    8 ,    28 ,    56 ,    70 ,    56 ,    28 ,     8 ,     1 ,,
    1 ,    9 ,    36 ,    84 ,   126 ,   126 ,    84 ,    36 ,     9 ,     1 ,,
    1 ,   10 ,    45 ,   120 ,   210 ,   252 ,   210 ,   120 ,    45 ,    10 ,     1 ,,
    1 ,	  11 , 	  55 ,   165 ,   330 ,   462 ,   462 ,   330 ,   165 ,    55 ,    11 ,     1 ,,
    1 ,	  12 ,	  66 ,	 220 ,	 495 ,	 792 ,	 924 ,	 792 ,	 495 ,	 220 ,	  66 ,	  12 ,	   1 ,,	 
    1 ,	  13 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  13 ,	   1 ,,
    1 ,	  14 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  14 ,	   1 ,,
    1 ,	  15 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  15 ,	   1 ,,

| sep = ,
| rows count = 12
| f(n) = htm: 2{{^|''n''}}
| type = equi
| cell style = background: red; color: white; 
| highlight style = background: green; color: white; 
| second highlight style = background: lightblue; color: white; 
| highlight = v
}}
yields (observe that the
n
th,
n   ≥   0
, [either upwards or downwards] slope 1/2 diagonal sums to the
(n + 1)
th Fibonacci number)
Pascal's triangle
n
       
2n

0   1  
1
1   1 1  
2
2   1 2 1  
4
3   1 3 3 1  
8
4   1 4 6 4 1  
16
5 1 5 10 10 5 1  
32
6   1 6 15 20 15 6 1  
64
7   1 7 21 35 35 21 7 1  
128
8   1 8 28 56 70 56 28 8 1  
256
9   1 9 36 84 126 126 84 36 9 1  
512
10 1 10 45 120 210 252 210 120 45 10 1  
1024
11   1 11 55 165 330 462 462 330 165 55 11 1  
2048

0
1
2
3
4
5
6
7
8
9
10
11  

The code

{{highlighted number triangle
| title = Pascal's triangle 
| rows =

    1 ,,
    1 ,    1 ,,
    1 ,    2 ,     1 ,,
    1 ,    3 ,     3 ,     1 ,,
    1 ,    4 ,     6 ,     4 ,     1 ,,
    1 ,    5 ,    10 ,    10 ,     5 ,     1 ,,
    1 ,    6 ,    15 ,    20 ,    15 ,     6 ,     1 ,,
    1 ,    7 ,    21 ,    35 ,    35 ,    21 ,     7 ,     1 ,,
    1 ,    8 ,    28 ,    56 ,    70 ,    56 ,    28 ,     8 ,     1 ,,
    1 ,    9 ,    36 ,    84 ,   126 ,   126 ,    84 ,    36 ,     9 ,     1 ,,
    1 ,   10 ,    45 ,   120 ,   210 ,   252 ,   210 ,   120 ,    45 ,    10 ,     1 ,,
    1 ,	  11 , 	  55 ,   165 ,   330 ,   462 ,   462 ,   330 ,   165 ,    55 ,    11 ,     1 ,,
    1 ,	  12 ,	  66 ,	 220 ,	 495 ,	 792 ,	 924 ,	 792 ,	 495 ,	 220 ,	  66 ,	  12 ,	   1 ,,	 
    1 ,	  13 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  13 ,	   1 ,,
    1 ,	  14 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  14 ,	   1 ,,
    1 ,	  15 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  15 ,	   1 ,,

| sep = ,
| rows count = 12
| type = rect
| f(n) = htm: 2{{^|''n''}}
| highlight = d6 
}}

yields

Pascal's triangle
n
       
2n

0   1  
1
1   1 1  
2
2   1 2 1  
4
3   1 3 3 1  
8
4   1 4 6 4 1  
16
5 1 5 10 10 5 1  
32
6   1 6 15 20 15 6 1  
64
7   1 7 21 35 35 21 7 1  
128
8   1 8 28 56 70 56 28 8 1  
256
9   1 9 36 84 126 126 84 36 9 1  
512
10 1 10 45 120 210 252 210 120 45 10 1  
1024
11   1 11 55 165 330 462 462 330 165 55 11 1  
2048

0
1
2
3
4
5
6
7
8
9
10
11  

The code

{{highlighted number triangle
| title = Pascal's triangle 
| rows =

    1 ,,
    1 ,    1 ,,
    1 ,    2 ,     1 ,,
    1 ,    3 ,     3 ,     1 ,,
    1 ,    4 ,     6 ,     4 ,     1 ,,
    1 ,    5 ,    10 ,    10 ,     5 ,     1 ,,
    1 ,    6 ,    15 ,    20 ,    15 ,     6 ,     1 ,,
    1 ,    7 ,    21 ,    35 ,    35 ,    21 ,     7 ,     1 ,,
    1 ,    8 ,    28 ,    56 ,    70 ,    56 ,    28 ,     8 ,     1 ,,
    1 ,    9 ,    36 ,    84 ,   126 ,   126 ,    84 ,    36 ,     9 ,     1 ,,
    1 ,   10 ,    45 ,   120 ,   210 ,   252 ,   210 ,   120 ,    45 ,    10 ,     1 ,,
    1 ,	  11 , 	  55 ,   165 ,   330 ,   462 ,   462 ,   330 ,   165 ,    55 ,    11 ,     1 ,,
    1 ,	  12 ,	  66 ,	 220 ,	 495 ,	 792 ,	 924 ,	 792 ,	 495 ,	 220 ,	  66 ,	  12 ,	   1 ,,	 
    1 ,	  13 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  13 ,	   1 ,,
    1 ,	  14 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  14 ,	   1 ,,
    1 ,	  15 ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	   ? ,	  15 ,	   1 ,,

| sep = ,
| rows count = 12
| type = rect
| f(n) = htm: 2{{^|''n''}}
| highlight = u6 
}}

yields (upwards diagonals [as per equilateral triangle] correspond to columns [as per rectangular triangle])

Pascal's triangle
n
       
2n

0   1  
1
1   1 1  
2
2   1 2 1  
4
3   1 3 3 1  
8
4   1 4 6 4 1  
16
5 1 5 10 10 5 1  
32
6   1 6 15 20 15 6 1  
64
7   1 7 21 35 35 21 7 1  
128
8   1 8 28 56 70 56 28 8 1  
256
9   1 9 36 84 126 126 84 36 9 1  
512
10 1 10 45 120 210 252 210 120 45 10 1  
1024
11   1 11 55 165 330 462 462 330 165 55 11 1  
2048

0
1
2
3
4
5
6
7
8
9
10
11  

Automatic triangle line breaks

You may use the {{triangle line breaks}} OEIS Wiki utility template to automatically generate the triangle line breaks.

The code

{{highlighted number triangle
| title =  
| rows count = 6
| rows =

{{triangle line breaks| 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, }}

| sep = ,
| f(n) = htm: ''t''{{sub|''n''}}
}}

yields

n
       
tn

0   0  
0
1   0 1  
1
2   0 1 2  
3
3   0 1 2 3  
6
4   0 1 2 3 4  
10
5 0 1 2 3 4 5  
15

0
1
2
3
4
5  

The code

{{highlighted number triangle
| float = left 
| title =  
| rows =

{{triangle line breaks| 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, }}

| rows count = 8
| start row = 1 | start column = 1 
| sep = ,
| f(n) = htm: ''t''{{sub|''n''}} 
}}

yields

n
       
tn

1   1  
1
2   1 2  
3
3   1 2 3  
6
4   1 2 3 4  
10
5   1 2 3 4 5  
15
6 1 2 3 4 5 6  
21
7   1 2 3 4 5 6 7  
28
8   1 2 3 4 5 6 7 8  
36

1
2
3
4
5
6
7
8  


See also