Skip to content

Abundance ​

How far the divisors of n overshoot twice n: σ(n)−2n\sigma(n) - 2n.

Abundance(n)σ(n)−2n\sigma(n) - 2n, where σ\sigma is the sum of the divisors of ∣n∣|n|.
SageMathsigma(abs(n), 1) - 2*abs(n)SymPyabundance(abs(n))
Typed signatures
TypePackageApplies
(integer) -> integernumber-theoryalways

Domain: Number theory

Details
  • Positive for an abundant number, zero for a perfect one, negative for a deficient one.
  • Defined on nonzero integers, with the sign of nn a unit, as in PrimeOmega: Abundance(−n)=Abundance(n)\mathrm{Abundance}(-n)=\mathrm{Abundance}(n). At 0 it stays unevaluated.
  • Abundance(n)=AliquotSum(n)−n\mathrm{Abundance}(n) = \mathrm{AliquotSum}(n) - n, which makes IsPerfect the test for 0.
  • Neither Wolfram nor Sage names it; SymPy's abundance answers positive integers only.

Plot

Examples

Basic #

Abundant: its proper divisors sum to 16, which is 4 more than 12

live ↗
InAbundance(12)\mathrm{Abundance}(12)Out44

Perfect: 1+2+4+7+14=281+2+4+7+14=28

live ↗
InAbundance(28)\mathrm{Abundance}(28)Out00

Deficient: σ(15)=24\sigma(15)=24, which is 6 short of 30

live ↗
InAbundance(15)\mathrm{Abundance}(15)Out−6-6

σ(1)−2=−1\sigma(1)-2=-1

live ↗
InAbundance(1)\mathrm{Abundance}(1)Out−1-1
Scope #

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

live ↗
InAbundance(−12)\mathrm{Abundance}(-12)Out44

Listable over a list

live ↗
InAbundance([6,12,15])\mathrm{Abundance}(\bigl\lbrack6, 12, 15\bigr\rbrack)Out[0,4,−6]\bigl\lbrack0, 4, -6\bigr\rbrack

Large integers: a power of 2 is always 1 short, 241−1−2412^{41}-1-2^{41}

live ↗
InAbundance(240)\mathrm{Abundance}(2^{40})Out−1-1
Applications #

The smallest odd abundant number: 33⋅5⋅73^3\cdot5\cdot7

live ↗
InAbundance(945)\mathrm{Abundance}(945)Out3030

The sign classifies: 1 abundant, 0 perfect, -1 deficient

live ↗
Insgn(Abundance(12))\mathrm{sgn}(\mathrm{Abundance}(12))Out11
Properties #

Abundance(n)=AliquotSum(n)−n\mathrm{Abundance}(n)=\mathrm{AliquotSum}(n)-n. See AliquotSum

live ↗
InAbundance(12)=AliquotSum(12)−12\mathrm{Abundance}(12)=\mathrm{AliquotSum}(12)-12OutTrue\mathrm{True}

Perfect numbers have abundance 0, as with 496. See IsPerfect

live ↗
InAbundance(496)=0\mathrm{Abundance}(496)=0OutTrue\mathrm{True}
Possible issues #

Zero is outside the domain, so it stays unevaluated

live ↗
InAbundance(0)\mathrm{Abundance}(0)OutAbundance(0)\mathrm{Abundance}(0)
About
Examples12
Checked againstWolfram Language 11 agree1 differSageMath 11 agree1 errorSymPy 11 agree1 unevaluatedJulia 11 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

See also: AliquotSum, DivisorSigma, IsPerfect, PerfectNumber