A294317 Triangle read by rows: T(n, k) = 2*n-k, k <= n.
0, 2, 1, 4, 3, 2, 6, 5, 4, 3, 8, 7, 6, 5, 4, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 14, 13, 12, 11, 10, 9, 8, 7, 16, 15, 14, 13, 12, 11, 10, 9, 8, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10
Offset: 0
Examples
Triangle begins: 0; 2, 1; 4, 3, 2; 6, 5, 4, 3; 8, 7, 6, 5, 4; 10, 9, 8, 7, 6, 5; 12, 11, 10, 9, 8, 7, 6; 14, 13, 12, 11, 10, 9, 8, 7; 16, 15, 14, 13, 12, 11, 10, 9, 8; 18, 17, 16, 15, 14, 13, 12, 11, 10, 9; 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10; ...
Links
- Muniru A Asiru, Table of n, a(n) for n = 0..100000
- Thomas H. Sidebotham, The A to Z of Mathematics: A Basic Guide, John Wiley & Sons, p. 181, (2003) ISBN 9780471461630.
Programs
-
GAP
A294317 := Flat(List([0..149],n->List([0..n],k->2*n-k))); # Muniru A Asiru, Dec 29 2017
-
Mathematica
Column[Table[2*n-k, {n, 0, 10}, {k, 0, n}], Center]
-
Python
def f(x): a=[] for k in range(x): for m in range (k+1): a.append(2*k-m) return a print(f(10))
Formula
T(n, k) = 2*n - k, 0 <= k <= n.
T(n, 2*m) = A005843(n), n >= m >= 0 (even-indexed columns).
T(n, 2*m+1) = A005408(n), n >= m >= 0 (odd-indexed columns).
T(n, n-m) = A001477(n+m), n >= m >= 0 (diagonals m >= 0).
G.f.: x*(2 + y - 3*x*y)/((1 - x)^2*(1 - x*y)^2). - Stefano Spezia, Sep 14 2024
Extensions
Edited by Wolfdieter Lang, Dec 08 2017