login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239287 Triangle T(n,k), 0 <= k <= n, read by rows: T(n,k) = floor(n/2) - min(k,n-k). 1

%I #17 Sep 08 2022 08:46:07

%S 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,

%T 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,

%U 3,2,1,0,0,1,2,3,4,5,6,5,4,3,2,1,0,1,2

%N Triangle T(n,k), 0 <= k <= n, read by rows: T(n,k) = floor(n/2) - min(k,n-k).

%C Row sums are A110660(n).

%H G. C. Greubel, <a href="/A239287/b239287.txt">Rows, n=0..100 of triangle, flattened</a>

%F T(n,k) = floor(n/2) - min(k,n-k).

%e Triangle begins:

%e 0;

%e 0, 0;

%e 1, 0, 1;

%e 1, 0, 0, 1;

%e 2, 1, 0, 1, 2;

%e 2, 1, 0, 0, 1, 2;

%e 3, 2, 1, 0, 1, 2, 3;

%e 3, 2, 1, 0, 0, 1, 2, 3;

%e 4, 3, 2, 1, 0, 1, 2, 3, 4;

%e 4, 3, 2, 1, 0, 0, 1, 2, 3, 4;

%e 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5;

%e 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5;

%e 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6;

%e 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6;

%e 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7;

%e 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7;

%e 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8;

%e 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8;

%e 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;

%e 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;

%t Column[Table[Floor[n/2] - Min[k, n - k], {n,0, 19}, {k, 0, n}]] (* _Indranil Ghosh_, Mar 15 2017 *)

%o (PARI) tabl(nn) = {for(n=0, nn, for(k=0, n, print1(floor(n/2) - min(k, n - k),", ");); print(););};

%o tabl(19); \\ _Indranil Ghosh_, Mar 15 2017

%o (Python)

%o i=0

%o for n in range(0,20):

%o ....for k in range(0, n+1):

%o ........print str(i)+" "+str((n/2) - min(k, n - k))

%o ........i+=1 # _Indranil Ghosh_, Mar 15 2017

%o (Magma) [[Floor(n/2) - Min(k,n-k): k in [0..n]]: n in [0..10]]; // _G. C. Greubel_, May 26 2018

%Y Cf. A004526.

%K nonn,tabl

%O 0,11

%A _Philippe Deléham_, Mar 14 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)