Skip to content

AliquotSum ​

The sum of the proper divisors of n: σ(n)−n\sigma(n) - n.

AliquotSum(n)s(n)=σ(n)−ns(n)=\sigma(n) - n, the sum of the divisors of ∣n∣|n| other than ∣n∣|n| itself.
SageMathsigma(abs(n), 1) - abs(n)SymPydivisor_sigma(abs(n)) - abs(n)
Typed signatures
TypePackageApplies
(integer) -> integernumber-theoryalways

Domain: Number theory

Details
  • A prime has aliquot sum 1, and s(1)=0s(1)=0 since 1 has no proper divisor.
  • Defined on nonzero integers, with the sign of nn a unit, as in PrimeOmega: s(−n)=s(n)s(-n)=s(n). At 0 it stays unevaluated.
  • Iterating ss gives the aliquot sequence; nn is perfect when s(n)=ns(n)=n, and m,nm, n are amicable when s(m)=ns(m)=n and s(n)=ms(n)=m.
  • Neither Wolfram, Sage nor SymPy names it.

Plot

Examples

Basic #

1+2+3+4+6=161+2+3+4+6=16

live ↗
InAliquotSum(12)\mathrm{AliquotSum}(12)Out1616

Perfect: its proper divisors sum back to 28

live ↗
InAliquotSum(28)\mathrm{AliquotSum}(28)Out2828

A prime has only 1 as a proper divisor

live ↗
InAliquotSum(13)\mathrm{AliquotSum}(13)Out11

1 has no proper divisor

live ↗
InAliquotSum(1)\mathrm{AliquotSum}(1)Out00
Scope #

Negative nn: the sign is a unit, as in PrimeOmega

live ↗
InAliquotSum(−12)\mathrm{AliquotSum}(-12)Out1616

Listable over a list

live ↗
InAliquotSum([6,12,13])\mathrm{AliquotSum}(\bigl\lbrack6, 12, 13\bigr\rbrack)Out[6,16,1]\bigl\lbrack6, 16, 1\bigr\rbrack

Large integers: 240−12^{40}-1, the proper divisors of 2402^{40}

live ↗
InAliquotSum(240)\mathrm{AliquotSum}(2^{40})Out1 099 511 627 7751\,099\,511\,627\,775
Applications #

Amicable pair: s(220)=284s(220)=284

live ↗
InAliquotSum(220)\mathrm{AliquotSum}(220)Out284284

and s(284)=220s(284)=220, so s(s(220))=220s(s(220))=220

live ↗
InAliquotSum(AliquotSum(220))\mathrm{AliquotSum}(\mathrm{AliquotSum}(220))Out220220
Properties #

s(n)=σ1(n)−ns(n)=\sigma_1(n)-n. See DivisorSigma

live ↗
InAliquotSum(360)=DivisorSigma(1,360)−360\mathrm{AliquotSum}(360)=\mathrm{DivisorSigma}(1, 360)-360OutTrue\mathrm{True}
Possible issues #

Zero is outside the domain, so it stays unevaluated

live ↗
InAliquotSum(0)\mathrm{AliquotSum}(0)OutAliquotSum(0)\mathrm{AliquotSum}(0)
About
Examples11
Checked againstWolfram Language 10 agree1 differSageMath 10 agree1 errorSymPy 10 agree1 errormathlib4 7 agree1 unevaluated3 errorJulia 10 agree1 error
CrosswalkWikipediaMathWorldOEISSageMathSymPy

Implementation

mappedwolframpackages/oracle/src/mappings.ts

Wolfram has no head for it; this is its definition, with the sign of n a unit.

mappedsympypackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts

Sage has no head for it; this is its definition, with the sign of n a unit.

mappedjuliapackages/oracle/src/mappings.ts
mappedmathlib4packages/oracle/src/mappings.ts

The sum over Nat.properDivisors, so aliquot 0 = 0; natural n only, where ours takes the sign of n as a unit.

See also: Abundance, DivisorSigma, Divisors, IsPerfect