OFFSET
1,7
COMMENTS
An anti-divisor of n is an integer d in [2,n-1] such that n == (d-1)/2, d/2, or (d+1)/2 (mod d), the class of d being -1, 0, or 1, respectively. The class sum of n is the sum of the classes of all of its anti-divisors.
See A066272 for definition of anti-divisor.
LINKS
Jon Perry, Class sums
FORMULA
f(n)=sum(ad class)
EXAMPLE
The ad's of 10 are 3, 4 and 7, with classes -1, 0 and -1, so f(10)=-2.
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}]
CROSSREFS
KEYWORD
sign
AUTHOR
Jon Perry, Jan 06 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 17 2002
STATUS
approved