This site is supported by donations to The OEIS Foundation.
Template:Triangle line breaks
From OeisWiki
The following documentation is located at Template:Triangle line breaks/doc. [<Edit> Template:Triangle line breaks/doc]
[⧼Purge⧽ Template:Triangle line breaks]
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 [⧼Purge⧽ Template:Triangle line breaks]
t8 = 36 |
Contents
Usage
- {{triangle line breaks|integer sequence|sep = separator}}
where
- integer sequence with up to
terms;t8 = 36 - 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
|
| ||||||||||||||||||||||
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 | |||||||||||||
|
|
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
|
| ||||||||||||||||||||||||
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 | ||||||||||||||||
|
|
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])