A049801 Triangular array T, read by rows: T(n,k) = n mod floor(k/3), k = 3..n and n >= 3.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 0, 0, 0, 3, 3, 3, 0
Offset: 3
Examples
Array T(n,k) (with rows n >= 3 and columns k >= 3) begins as follows: 0; 0, 0; 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 1, 1; 0, 0, 0, 0, 0, 0; 0, 0, 0, 1, 1, 1, 0; 0, 0, 0, 0, 0, 0, 1, 1; 0, 0, 0, 1, 1, 1, 2, 2, 2; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1; 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2; ...
Links
- G. C. Greubel, Rows n = 3..100 of triangle, flattened
Programs
-
GAP
Flat(List([3..15], n-> List([3..n], k-> n mod Int(k/3) ))); # G. C. Greubel, Dec 09 2019
-
Magma
[ n mod Floor(k/3): k in [3..n], n in [3..15]]; // G. C. Greubel, Dec 09 2019
-
Maple
# To get the sequence: seq(seq(n mod floor(k/3), k = 3..n), n = 3..30); # To get the triangular array: for n from 3 to 30 do seq(n mod floor(k/3), k = 3..n); end do; # Petros Hadjicostas, Nov 20 2019
-
Mathematica
Table[Mod[n, Floor[k/3]], {n,3,15}, {k,3,n}]//Flatten (* G. C. Greubel, Dec 09 2019 *)
-
PARI
T(n,k) = lift(Mod(n, k\3)); \\ G. C. Greubel, Dec 09 2019
-
Sage
[[ mod(n, floor(k/3)) for k in (3..n)] for n in (3..15)] # G. C. Greubel, Dec 09 2019
Extensions
Name edited by and more terms from Petros Hadjicostas, Nov 20 2019