A176850 a(n,k) is the number of ways to choose integers i,j from {0,1,...,k} such that the inequalities |i-j| <= n <= i+j are satisfied.
1, 2, 3, 1, 3, 6, 6, 3, 1, 4, 9, 11, 10, 6, 3, 1, 5, 12, 16, 17, 15, 10, 6, 3, 1, 6, 15, 21, 24, 24, 21, 15, 10, 6, 3, 1, 7, 18, 26, 31, 33, 32, 28, 21, 15, 10, 6, 3, 1, 8, 21, 31, 38, 42, 43, 41, 36, 28, 21, 15, 10, 6, 3, 1, 9, 24, 36, 45, 51, 54, 54, 51, 45, 36, 28, 21, 15, 10, 6, 3, 1, 10, 27, 41, 52, 60, 65, 67, 66, 62, 55, 45, 36, 28, 21, 15, 10, 6, 3
Offset: 0
Examples
Triangle begins 1; 2, 3, 1; 3, 6, 6, 3, 1; 4, 9, 11, 10, 6, 3, 1; 5, 12, 16, 17, 15, 10, 6, 3, 1; 6, 15, 21, 24, 24, 21, 15, 10, 6, 3, 1; 7, 18, 26, 31, 33, 32, 28, 21, 15, 10, 6, 3, 1; 8, 21, 31, 38, 42, 43, 41, 36, 28, 21, 15, 10, 6, 3, 1; 9, 24, 36, 45, 51, 54, 54, 51, 45, 36, 28, 21, 15, 10, 6, 3, 1; 10, 27, 41, 52, 60, 65, 67, 66, 62, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1;
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10200 (rows n = 0..100, flattened)
- Eliahu Cohen, Tobias Hansen, and Nissan Itzhaki, From Entanglement Witness to Generalized Catalan Numbers, arXiv:1511.06623 [quant-ph], 2015.
Crossrefs
Cf. A005917.
Programs
-
Maple
Seq:=[]: for k from 0 to 15 do for n from 0 to k do Seq:= [op(Seq), -(3/2)*n^2+2*k*n+(1/2)*n+k+1] end do; for n from k+1 to 2*k do Seq:= [op(Seq), (1/2)*(2*k-n+1)*(2*k-n+2)] end do; end do; Seq;
-
Mathematica
Table[If[n <= k, -(3/2)*n^2 + 2*k*n + n/2 + k + 1, (2*k - n + 1)*(2*k - n + 2)/2], {k, 0, 8}, {n, 0, 2 k}] // Flatten (* Michael De Vlieger, Jul 10 2022 *)
Formula
a(n,k) = -(3/2)*n^2 + 2*k*n + n/2 + k + 1 for n=0,1,...,k, a(n) = (2*k-n+1)*(2*k-n+2)/2 for n = k+1,...,2*k.
Extensions
Edited by Sean Murray, Oct 05 2011
Comments