A066518 Anti-divisor class sums of n.
0, 0, 0, -1, 1, 0, -2, 2, 0, -2, 2, -1, -1, 2, 0, -2, 0, 2, -2, 2, 0, -4, 4, -1, -1, 2, -2, 0, 2, 0, -4, 2, 2, -2, 2, 0, -4, 2, 2, -3, 3, -2, 0, 2, -2, 0, 0, 2, -4, 4, 0, -6, 6, 0, -2, 2, -2, -2, 2, 1, -1, 0, 2, -2, 2, -2, -4, 6, 0, -2, 0, 0, -2, 4, 0, -4, 2, 2, -2, 0, 2, -6, 6, -1, -3, 4, -4, 2, 2, 0, -2, 0, 0, -4, 6, 0, -6, 6, 0, -2, 0, 0, -2
Offset: 1
Keywords
Examples
The ad's of 10 are 3, 4 and 7, with classes -1, 0 and -1, so f(10)=-2.
Links
- Jon Perry, Class sums
Crossrefs
Cf. A066519.
Programs
-
Mathematica
a[n_ ] := Sum[Which[Mod[n, d]==(d-1)/2, -1, Mod[n, d]==(d+1)/2, 1, True, 0], {d, 2, n-1}]
Formula
f(n)=sum(ad class)
Extensions
Edited by Dean Hickerson, Jan 17 2002
Comments