This site is supported by donations to The OEIS Foundation.

Template:Triangle line breaks/doc

From OeisWiki
Jump to: navigation, search

This documentation subpage contains instructions, categories, or other information for Template:Triangle line breaks. [<Edit> Template:Triangle line breaks]

[⧼Purge⧽ Template:Triangle line breaks/doc]
You may use the {{triangle line breaks}} OEIS Wiki utility template to automatically generate the triangle line breaks in a sequence of integers for the {{number triangle}} template. Currently, up to 
t8 = 36
sequence terms are supported, giving up to 8 rows.

Usage

{{triangle line breaks|integer sequence|sep = separator}}

where

  • integer sequence with up to 
    t8 = 36
    terms;
  • separator is the sequence terms separator (default: ,).

The triangle line breaks are then automatically marked with two instances of separator in a row.

Examples

The code

: {{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, }}

gives

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 ,,

Number triangles

The code

{{number triangle
| title =  
| rows count = 8
| 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
6   0 1 2 3 4 5 6  
21
7   0 1 2 3 4 5 6 7  
28

k = 0

1
2
3
4
5
6
7  

The code

{{highlighted number triangle
| title = 
| type = equi
| sep = ,
| 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, }}

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

yields

n
       
n

k  = 0
T  (n, k)

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
6   0 1 2 3 4 5 6  
21

k = 0

1
2
3
4
5
6  

See also

  • {{number triangle}} (no highlighting, but up to 16 rows)
  • {{highlighted number triangle}} (to highlight either: a row, a column [of rectangular triangle], the central coefficients, a single [or all] downwards diagonal[s], a single [or all] downwards slope 1/2 diagonal[s], a single [or all] upwards diagonal[s], or a single [or all] upwards slope 1/2 diagonal[s])