OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MAPLE
seq( add( `mod`(k^3, n) + `mod`(n^3, k), k = 1..n), n = 1..50); # G. C. Greubel, Dec 13 2019
MATHEMATICA
Table[Sum[PowerMod[k, 3, n] + PowerMod[n, 3, k], {k, n}], {n, 50}] (* G. C. Greubel, Dec 13 2019 *)
PROG
(PARI) T(n, k) = lift(Mod(k, n)^3) + lift(Mod(n, k)^3);
vector(50, n, sum(k=1, n, T(n, k)) ) \\ G. C. Greubel, Dec 13 2019
(Magma) [&+[Modexp(k, 3, n) + Modexp(n, 3, k): k in [1..n]]: n in [1..50]]; // G. C. Greubel, Dec 13 2019
(Sage) [sum(power_mod(k, 3, n) + power_mod(n, 3, k) for k in (1..n)) for n in (1..50)] # G. C. Greubel, Dec 13 2019
(GAP) List([1..50], n-> Sum([1..n], k-> PowerMod(k, 3, n) + PowerMod(n, 3, k)) ); # G. C. Greubel, Dec 13 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved