(MAGMAMagma) [[Modexp(k, 2, n) + Modexp(n, 2, k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
(MAGMAMagma) [[Modexp(k, 2, n) + Modexp(n, 2, k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
reviewed
approved
proposed
reviewed
editing
proposed
Triangular array T, read by rows: T(n,k) = (k^2 mod n) + (n^2 mod k), for k = 1..n and n >= 1.
1, 0;
1, 2, 0;
1, 0, 2, 0;
1, 5, 5, 2, 0;
1, 4, 3, 4, 2, 0;
1, 5, 3, 3, 8, 2, 0;
1, 4, 2, 0, 5, 8, 2, 0;
1, 5, 0, 8, 8, 3, 8, 2, 0;
1, 4, 10, 6, 5, 10, 11, 8, 2, 0;
proposed
editing
editing
proposed
G. C. Greubel, <a href="/A049767/b049767.txt">Rows n = 1..100 of triangle, flattened</a>
seq(seq( `mod`(k^2, n) + `mod`(n^2, k), k = 1..n), n = 1..15); # G. C. Greubel, Dec 13 2019
Table[PowerMod[k, 2, n] + PowerMod[n, 2, k], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Dec 13 2019 *)
(PARI) T(n, k) = lift(Mod(k, n)^2) + lift(Mod(n, k)^2);
for(n=1, 15, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Dec 13 2019
(MAGMA) [[Modexp(k, 2, n) + Modexp(n, 2, k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
(Sage) [[power_mod(k, 2, n) + power_mod(n, 2, 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-> PowerMod(k, 2, n) + PowerMod(n, 2, k) ))); # G. C. Greubel, Dec 13 2019
approved
editing
proposed
approved
editing
proposed
T(n, k) = A048152(n, k) + A049759(n, k). - Michel Marcus, Nov 21 2019
proposed
editing