login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A067459
Sum of the remainders when n^2 is divided by squares less than n.
2
0, 0, 1, 7, 17, 15, 43, 58, 66, 90, 189, 211, 273, 336, 431, 398, 588, 689, 910, 872, 1199, 1435, 1438, 1862, 2007, 2079, 2208, 2764, 3329, 2964, 4356, 3945, 4359, 4633, 5330, 5855, 6210, 7491, 7821, 7406, 9610, 9373, 10309, 10606, 11965, 12362, 12468
OFFSET
1,4
LINKS
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
Cf. A000290.
Sequence in context: A283163 A196164 A071615 * A323746 A101240 A191070
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Feb 07 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Feb 08 2002
STATUS
approved