OFFSET
1,3
REFERENCES
H. J. S. Smith, Report on the Theory of Numbers, reprinted in Vol. 1 of his Collected Math. Papers, Chelsea, NY, 1979, see p. 323.
MAPLE
with(numtheory); A117001:=proc(n) local d, t1, t2; t1:=0; t2:=0; for d from 1 to n do if n mod d = 0 then if d^2>n then t1:=t1+jacobi(2, d)*d; fi; if d^2<n then t2:=t2+jacobi(2, d)*d; fi; fi; od: t1-t2; end;
MATHEMATICA
a[n_] := Sum[Which[Sqrt[n]<d<=n, 1, 1<=d<Sqrt[n], -1, True, 0]*JacobiSymbol[2, d]*d, {d, Divisors[n]}];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 17 2023 *)
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Apr 15 2006
STATUS
approved