cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A066518 Anti-divisor class sums of n.

Original entry on oeis.org

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

Views

Author

Jon Perry, Jan 06 2002

Keywords

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.

Examples

			The ad's of 10 are 3, 4 and 7, with classes -1, 0 and -1, so f(10)=-2.
		

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