Two-size whole-count combinations calculator
Enter two positive integer sizes and a target. The report finds ordered count pairs satisfying first size × first count + second size × second count = target.
Result
- Solution count
- 2
- Greatest common divisor
- 1
- Displayed solutions
- 2
- List order
- Increasing first count; first 100 shown
| First count | Second count |
|---|---|
| 0 | 4 |
| 7 | 0 |
Check whole-count feasibility
Sizes 4 and 7 can make 28 with counts 0 and 4, or 7 and 0. These are separate ordered solutions. A target of zero has the single solution 0 and 0.
A common divisor is only an initial check
Divisibility by the greatest common divisor is necessary, but nonnegative counts can still make a small target impossible. The calculator enumerates the first count and tests the remainder exactly. Sizes range from 1 through 100,000; the target ranges from zero through 100,000. All solutions are counted, and the first 100 appear in increasing first-count order. Equal sizes still treat the two count positions as distinct.
Work through the reasoning
Checking a target that passes GCD divisibility but has no nonnegative solution