A157901 Triangle read by rows: A000012 * A157898.
1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 3, 6, 10, 8, 8, 3, 9, 16, 24, 16, 16, 4, 12, 28, 40, 56, 32, 32, 4, 16, 40, 80, 96, 128, 64, 64, 5, 20, 60, 120, 216, 224, 288, 128, 128, 5, 25, 80, 200, 336, 560, 512, 640, 256, 256, 6, 30, 110, 280, 616, 896, 1408, 1152, 1408, 512, 512
Offset: 0
Examples
First few rows of the triangle, n>=0: 1; 1, 1; 2, 2, 2; 2, 4, 4, 4; 3, 6, 10, 8, 8; 3, 9, 16, 24, 16, 16; 4, 12, 28, 40, 56, 32, 32; 4, 16, 40, 80, 96, 128, 64, 64; 5, 20, 60, 120, 216, 224, 288, 128, 128; 5, 25, 80, 200, 336, 560, 512, 640, 256, 256;
Links
- G. C. Greubel, Rows n = 0..50 of the triangle, flattened
Crossrefs
Programs
-
Magma
A011782:= func< n | n eq 0 select 1 else 2^(n-1) >; function t(n, k) // t = A059576 if k eq 0 or k eq n then return A011782(n); else return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1); end if; return t; end function; A157898:= func< n, k | (&+[(-1)^(n-j)*Binomial(n, j)*t(j, k): j in [k..n]]) >; A157071:= func< n,k | (&+[A157898(j+k,k): j in [0..n-k]]) >; [A157071(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 27 2025
-
Mathematica
t[n_, k_]:= t[n,k]= If[k==0 || k==n, 2^(n-1) +Boole[n==0]/2, 2*t[n-1,k-1] +2*t[n-1,k] - (2 -Boole[n==2])*t[n-2,k-1]]; (* t = A059576 *) A157898[n_, k_]:= A157898[n,k]= Sum[(-1)^(n-j)*Binomial[n,j]*t[j,k], {j,k,n}]; A157901[n_, k_]:= A157901[n,k]= Sum[A157898[j+k,k], {j,0,n-k}]; Table[A157901[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 27 2025 *)
-
SageMath
@CachedFunction def t(n, k): # t = A059576 if (k==0 or k==n): return bool(n==0)/2 + 2^(n-1) # A011782 else: return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1) def A157898(n, k): return sum((-1)^(n+k-j)*binomial(n, j+k)*t(j+k, k) for j in range(n-k+1)) def A157071(n,k): return sum(A157898(j+k,k) for j in range(n-k+1)) print(flatten([[A157071(n,k) for k in range(n+1)] for n in range(10)])) # G. C. Greubel, Aug 27 2025
Formula
T(n,k) = Sum_{j=0..n} A157898(j,k).
Extensions
Edited by the Associate Editors of the OEIS, Apr 10 2009
More terms from G. C. Greubel, Aug 27 2025
Comments