Sum of Squared Divisors

Return σ₂(n), the exact sum of squares of all positive divisors, using prime-power products and trial division limited to n≤10¹².

Description

The divisor function σ₂(n) sums the squares of all positive divisors, including one and n.

The divisor function σ₂(n) sums the squares of all positive divisors, including one and n. Prime factorization turns the sum into a product of geometric sums.1

The tool returns value. The indexing and output conventions below determine how to read these values.

When to use Sum of Squared Divisors

Use this for the following task: Return σ₂(n), the exact sum of squares of all positive divisors, using prime-power products and trial division limited to n≤10¹². Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Sum of Squared Divisors and understand its results

  1. Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
  2. Enter n according to the field table, then run the tool.
  3. Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
  4. Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
Input fieldMeaningValue type and boundsRequirement
nPositive integer (trial-division resource limit 10^12)integer; minimum 1; maximum 1000000000000Required

Factor n and multiply exact BigInt geometric-series contributions. One returns the single-divisor sum one.

σ₂(n)=Π[p^a∥n](p^(2(a+1))−1)/(p²−1)

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
valueSum of squared positive divisorsstring (integer/arbitrary)
json
{
  "input": {
    "n": 12
  },
  "output": {
    "value": "210"
  }
}

Limitations and assumptions

The input is at most 10¹². The tool does not enumerate divisors or return the ordinary, unsquared divisor sum.

Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.

Alternative or Complementary methods

Choose Abundancy Ratio when you need its operation: Compute the abundancy index σ(n)/n over all positive divisors, returning a reduced exact fraction and its floating-point value; trial division is limited to n≤10¹². Choose Distinct Prime Factor Count for the complementary operation: Return ω(n), the number of distinct prime factors, with ω(1)=0 and trial division limited to n≤10¹².

Background reference: Digital Library of Mathematical Functions, §27.2.

References

  1. Digital Library of Mathematical Functions, §27.2 — National Institute of Standards and Technology

Similar or alternative tools

  • Abundancy Ratio

    Compute the abundancy index σ(n)/n over all positive divisors, returning a reduced exact fraction and its floating-point value; trial division is limited to n≤10¹².

  • Distinct Prime Factor Count

    Return ω(n), the number of distinct prime factors, with ω(1)=0 and trial division limited to n≤10¹².

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies