login
A049800
Triangular array T, read by rows: T(n,k) = (n+1) mod floor((k+1)/2), k = 1..n and n >= 1.
5
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 2, 2, 0, 0, 0, 1, 1, 2, 2, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 2, 2, 0
OFFSET
1,26
EXAMPLE
Array T(n,k) (with rows n >= 1 and columns k >= 1) begins as follows:
0;
0, 0;
0, 0, 0;
0, 0, 1, 1;
0, 0, 0, 0, 0;
0, 0, 1, 1, 1, 1;
0, 0, 0, 0, 2, 2, 0;
0, 0, 1, 1, 0, 0, 1, 1;
0, 0, 0, 0, 1, 1, 2, 2, 0;
0, 0, 1, 1, 2, 2, 3, 3, 1, 1;
0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0;
...
MAPLE
# To get the sequence:
seq(seq((n+1) mod floor((k+1)/2), k = 1..n), n = 1..30);
# To get the triangular array:
for n from 1 to 30 do
seq((n+1) mod floor((k+1)/2), k = 1..n);
end do; # Petros Hadjicostas, Nov 20 2019
MATHEMATICA
Table[Mod[n+1, Floor[(k+1)/2]], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Dec 09 2019 *)
PROG
(PARI) T(n, k) = lift(Mod(n+1, (k+1)\2));
for(n=1, 15, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Dec 09 2019
(Magma) [ (n+1) mod Floor((k+1)/2): k in [1..n], n in [1..15]]; // G. C. Greubel, Dec 09 2019
(Sage) [[ mod(n+1, floor((k+1)/2)) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Dec 09 2019
(GAP) Flat(List([1..15], n-> List([1..n], k-> (n+1) mod Int((k+1)/2) ))); # G. C. Greubel, Dec 09 2019
CROSSREFS
One-half the row sums are in A049798.
Sequence in context: A196078 A287086 A180823 * A281082 A204421 A131018
KEYWORD
nonn,tabl
EXTENSIONS
Name edited by Petros Hadjicostas, Nov 20 2019
STATUS
approved