Staaarter

Generate Deficient Number Sequence

Generates the first N deficient numbers by testing each candidate integer's proper divisor sum against the number itself, listing every value whose divisors add up to less than it. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-08-05
By Staaarter Team
number-theorysequences

Overview

Introduction

Deficient numbers make up the most populous of the three classical divisor-sum categories, sitting opposite abundant numbers with perfect numbers as the exact dividing line.

This generator lists the first N deficient numbers in order, computing each candidate's proper divisor sum to confirm it falls short of the number itself.

What Is Generate Deficient Number Sequence?

A deficient number is a positive integer whose proper divisors, every divisor except the number itself, add up to less than the number.

Every prime number is automatically deficient, since a prime's only proper divisor is 1, and 1 is always less than the prime itself. Many composite numbers are deficient too, like 8, whose divisors 1, 2, and 4 sum to 7.

How Generate Deficient Number Sequence Works

For each candidate integer starting from 1, the tool collects every divisor up to its square root, pairing each factor with its complement to build the full divisor set efficiently.

It sums all divisors except the number itself and compares the total to the number. If the sum is strictly less, the candidate is deficient and gets appended to the output; the search then continues to the next integer.

When To Use Generate Deficient Number Sequence

Use it when exploring the divisor-sum classification of integers, especially to see how much more common deficient numbers are compared to abundant or perfect ones.

It's also useful for generating verified test data for divisor-sum algorithms, or for classroom material contrasting deficient, perfect, and abundant numbers side by side.

Features

Advantages

  • Computes exact divisor sums for every candidate rather than relying on shortcuts that might miss edge cases like prime powers.
  • Lists results in strict increasing order, matching standard reference sequences.
  • Runs entirely client-side with no size limits beyond the term-count cap needed to keep the search responsive.

Limitations

  • Capped at 2000 terms per run, since testing every intervening integer's divisor sum in a browser takes longer for much larger requests.
  • Starts the search at 1 with no way to jump into an arbitrary range of the sequence.

Examples

First 10 deficient numbers

Input

10

Output

1, 2, 3, 4, 5, 7, 8, 9, 10, 11

6 is skipped because it's a perfect number (divisors 1, 2, 3 sum to exactly 6), not deficient.

Best Practices & Notes

Best Practices

  • Request a moderate term count first, deficient numbers are dense, so even 20 terms give a clear sense of the pattern and its rare gaps.
  • Watch for the gaps where perfect or abundant numbers are skipped, like 6, 12, and 18, to see how the three classifications interleave.

Developer Notes

The divisor sum helper only iterates up to `Math.floor(Math.sqrt(n))`, adding both `i` and its paired divisor `n / i`, keeping the per-candidate cost around O(sqrt(n)) so the search stays responsive even near the 2000-term cap.

Generate Deficient Number Sequence Use Cases

  • Studying which integers are deficient versus abundant or perfect in a number theory course
  • Generating known-correct test data for divisor-sum programming exercises
  • Confirming that a specific number, like a prime, is deficient by seeing it appear in the sequence

Common Mistakes

  • Assuming every composite number is abundant, most composites, like 8, 9, and 10, are actually deficient too.
  • Forgetting that perfect numbers like 6, 28, and 496 are excluded from this list since their divisor sum equals the number exactly, not less than it.

Tips

  • Compare the output against Perfect Number Generator's list to see exactly which numbers get skipped as the deficient sequence runs.
  • Use Number Divisor Finder on any listed value to see the specific proper divisors that make it deficient.

References

Frequently Asked Questions