OFFSET

1,6

EXAMPLE

a(25) = 17. The squares < 25 are 4, 9 and 16 and the remainders are 1, 7 and 9 and the sum = 17.

MATHEMATICA

a[n_] := Sum[Mod[n, k^2], {k, 1, Floor[Sqrt[n]]}]

Table[Total[Table[Mod[k, n], {n, Range[Floor[Sqrt[k]]]^2}]], {k, 80}] (* Harvey P. Dale, Jan 04 2024 *)

CROSSREFS

KEYWORD

nonn

AUTHOR

Amarnath Murthy, Jul 31 2002

EXTENSIONS

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 25 2003 and Dean Hickerson, Apr 28 2003

STATUS

approved