(MAGMAMagma) [[(k mod n) + (n mod k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
(MAGMAMagma) [[(k mod n) + (n mod k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
reviewed
approved
proposed
reviewed
editing
proposed
G. C. Greubel, <a href="/A049765/b049765.txt">Rows n = 1..100 of triangle, flattened</a>
seq(seq( `mod`(k, n) + `mod`(n, k), k = 1..n), n = 1..15); # G. C. Greubel, Dec 13 2019
Table[Mod[k, n] + Mod[n, k], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Dec 13 2019 *)
(PARI) T(n, k) = k%n + n%k;
for(n=1, 15, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Dec 13 2019
(MAGMA) [[(k mod n) + (n mod k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
(Sage) [[(k%n) + (n%k) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Dec 13 2019
(GAP) Flat(List([1..15], n-> List([1..n], k-> (k mod n) + (n mod k) ))); # G. C. Greubel, Dec 13 2019
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
editing
proposed