login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A239287
Triangle T(n,k), 0 <= k <= n, read by rows: T(n,k) = floor(n/2) - min(k,n-k).
1
0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2
OFFSET
0,11
COMMENTS
Row sums are A110660(n).
FORMULA
T(n,k) = floor(n/2) - min(k,n-k).
EXAMPLE
Triangle begins:
0;
0, 0;
1, 0, 1;
1, 0, 0, 1;
2, 1, 0, 1, 2;
2, 1, 0, 0, 1, 2;
3, 2, 1, 0, 1, 2, 3;
3, 2, 1, 0, 0, 1, 2, 3;
4, 3, 2, 1, 0, 1, 2, 3, 4;
4, 3, 2, 1, 0, 0, 1, 2, 3, 4;
5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5;
5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5;
6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6;
6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6;
7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7;
7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7;
8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8;
8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8;
9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
MATHEMATICA
Column[Table[Floor[n/2] - Min[k, n - k], {n, 0, 19}, {k, 0, n}]] (* Indranil Ghosh, Mar 15 2017 *)
PROG
(PARI) tabl(nn) = {for(n=0, nn, for(k=0, n, print1(floor(n/2) - min(k, n - k), ", "); ); print(); ); };
tabl(19); \\ Indranil Ghosh, Mar 15 2017
(Python)
i=0
for n in range(0, 20):
....for k in range(0, n+1):
........print str(i)+" "+str((n/2) - min(k, n - k))
........i+=1 # Indranil Ghosh, Mar 15 2017
(Magma) [[Floor(n/2) - Min(k, n-k): k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 26 2018
CROSSREFS
Cf. A004526.
Sequence in context: A209318 A170984 A114021 * A305258 A053616 A365746
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, Mar 14 2014
STATUS
approved