A051162 Triangle T(n,k) = n+k, n >= 0, 0 <= k <= n.
0, 1, 2, 2, 3, 4, 3, 4, 5, 6, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10, 11, 12, 7, 8, 9, 10, 11, 12, 13, 14, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
Offset: 0
Examples
The triangle T(n, k) starts: n\k 0 1 2 3 4 5 6 7 8 9 10 ... 0: 0 1: 1 2 2: 2 3 4 3: 3 4 5 6 4: 4 5 6 7 8 5: 5 6 7 8 9 10 6: 6 7 8 9 10 11 12 7: 7 8 9 10 11 12 13 14 8: 8 9 10 11 12 13 14 15 16 9: 9 10 11 12 13 14 15 16 17 18 10: 10 11 12 13 14 15 16 17 18 19 20 ... reformatted. - _Wolfdieter Lang_, May 15 2015
Links
- Reinhard Zumkeller, Rows n=0..100 of triangle, flattened
- Eric Naslund, Euler-Mascheroni constant expression, further simplification
- Dmitry A. Zaitsev, A generalized neighborhood for cellular automata, Theoretical Computer Science, 2016, Volume 666, 1 March 2017, Pages 21-35.
Crossrefs
Programs
-
Haskell
a051162 n k = a051162_tabl !! n !! k a051162_row n = a051162_tabl !! n a051162_tabl = iterate (\xs@(x:_) -> (x + 1) : map (+ 2) xs) [0] -- Reinhard Zumkeller, Sep 17 2014, Oct 02 2012, Apr 23 2012
-
Maple
seq(seq(r+c, c=0..r),r=0..10); # Robert Israel, May 21 2015
-
Mathematica
With[{c=Range[0,20]}, Flatten[Table[Take[c,{n,2n-1}], {n,11}]]] (* Harvey P. Dale, Nov 19 2011 *)
-
PARI
for(n=0,10,for(k=0,n,print1(n+k,", "))) \\ Derek Orr, May 19 2015
Formula
T(n, k) = n + k, 0 <= k <= n.
a(n-1) = (t - t^2+ 2n-2)/2, where t = floor((-1+sqrt(8*n-7))/2), n > 0. - Robert G. Wilson v and Boris Putievskiy, Mar 14 2012
From Robert Israel, May 21 2015: (Start)
G.f.: x/(1-x)^2 + (1-x)^(-1)*Sum(j>=1, (1-j)*x^A000217(j)). The sum is related to Jacobi Theta functions. (End)
G.f. as triangle: (x + (2 - 3*x)*x*y)/((1 - x)^2*(1 - x*y)^2). - Stefano Spezia, Apr 22 2024
Comments