A103516 Triangle read by rows: count in a vee.
1, 2, 2, 3, 0, 3, 4, 0, 0, 4, 5, 0, 0, 0, 5, 6, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Examples
Triangle begins 1, 2, 2, 3, 0, 3, 4, 0, 0, 4, 5, 0, 0, 0, 5, 6, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 8, ...
Programs
-
Mathematica
Join[{1},Flatten[Table[Flatten[Join[{n,PadRight[{},n-2,0],n}]],{n,2,15}]]] (* Harvey P. Dale, Mar 23 2013 *)
-
PARI
tabl(nn) = {for (i=1, nn, for (j=1, i, if (j == 1, t = i, if (j==i, t = i, t = 0)); print1(t, ", ");); print(););} \\ Michel Marcus, Aug 30 2013
Formula
Number triangle T(n, k)=if(k<=n, 0^(k(n-k))*(n+1), 0)
Comments