A140996 Triangle G(n, k) read by rows for 0 <= k <= n, where G(n, 0) = G(n+1, n+1) = 1, G(n+2, n+1) = 2, G(n+3, n+1) = 4, G(n+4, n+1) = 8, and G(n+5, m) = G(n+1, m-1) + G(n+1, m) + G(n+2, m) + G(n+3, m) + G(n+4, m) for n >= 0 for m = 1..(n+1).
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 31, 17, 8, 4, 2, 1, 1, 60, 35, 17, 8, 4, 2, 1, 1, 116, 72, 35, 17, 8, 4, 2, 1, 1, 224, 148, 72, 35, 17, 8, 4, 2, 1, 1, 432, 303, 149, 72, 35, 17, 8, 4, 2, 1, 1, 833, 618, 308, 149, 72, 35, 17, 8, 4, 2, 1, 1, 1606, 1257, 636, 308, 149, 72, 35, 17, 8, 4, 2, 1
Offset: 0
Examples
Triangle (with rows n >= 0 and columns k >= 0) begins as follows: 1 1 1 1 2 1 1 4 2 1 1 8 4 2 1 1 16 8 4 2 1 1 31 17 8 4 2 1 1 60 35 17 8 4 2 1 1 116 72 35 17 8 4 2 1 1 224 148 72 35 17 8 4 2 1 1 432 303 149 72 35 17 8 4 2 1 1 833 618 308 149 72 35 17 8 4 2 1 ...
Links
- Robert Price, Table of n, a(n) for n = 0..5150
- Juri-Stepan Gerasimov, Stepan's triangles and Pascal's triangle are connected by the recurrence relation ...
Crossrefs
Programs
-
Mathematica
nlim = 100; For[n = 0, n <= nlim, n++, G[n, 0] = 1]; For[n = 1, n <= nlim, n++, G[n, n] = 1]; For[n = 2, n <= nlim, n++, G[n, n-1] = 2]; For[n = 3, n <= nlim, n++, G[n, n-2] = 4]; For[n = 4, n <= nlim, n++, G[n, n-3] = 8]; For[n = 5, n <= nlim, n++, For[k = 1, k < n - 3, k++, G[n, k] = G[n-4, k-1] + G[n-4, k] + G[n-3, k] + G[n-2, k] + G[n-1, k]]]; A140996 = {}; For[n = 0, n <= nlim, n++, For[k = 0, k <= n, k++, AppendTo[A140996, G[n, k]]]]; A140996 (* Robert Price, Jul 03 2019 *) G[n_, k_] := G[n, k] = Which[k < 0 || k > n, 0, k == 0 || k == n, 1, k == n - 1, 2, k == n - 2, 4, k == n - 3, 8, True, G[n - 1, k] + G[n - 2, k] + G[n - 3, k] + G[n - 4, k] + G[n - 4, k - 1]]; Table[G[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 28 2024 *)
Formula
From Petros Hadjicostas, Jun 12 2019: (Start)
G(n, k) = A140995(n, n - k) for 0 <= k <= n.
Bivariate g.f.: Sum_{n,k >= 0} G(n, k)*x^n*y^k = (1 - x - x^2 - x^3 - x^4 + x^2*y + x^3*y + x^5*y)/((1 - x) * (1 - x*y) * (1 - x - x^2 - x^3 - x^4 - x^4*y)).
If we take the first derivative of the bivariate g.f. w.r.t. y and set y = 0, we get the g.f. of column k = 1: x/((1 - x) * (1 - x - x^2 - x^3 - x^4)). This is the g.f. of a shifted version of sequence A107066.
Substituting y = 1 in the above bivariate function and simplifying, we get the g.f. of row sums: 1/(1 - 2*x). Hence, the row sums are powers of 2; i.e., A000079.
(End)
Extensions
Name edited by Petros Hadjicostas, Jun 12 2019
Comments