OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..n-1} (n^2 mod k^2). [From Robert Israel, Jan 07 2021 Maple program.]
MAPLE
f:= proc(n) local k; add(n^2 mod k^2, k=2..n-1) end proc:
map(f, [$1..100]); # Robert Israel, Jan 07 2021
MATHEMATICA
Table[ Apply[ Plus, Mod[n^2, Table[i^2, {i, 1, n - 1} ]]], {n, 1, 50} ]
PROG
(PARI) a(n) = sum(k=1, n-1, n^2 % k^2); \\ Michel Marcus, Jan 09 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Feb 07 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Feb 08 2002
STATUS
approved