Mian-Chowla Sequence Calculator

Sequences

Mian-Chowla value a(10)81
previous term a(9)66
pairwise sums kept distinct so far55
largest pairwise sum 2 x a(10)162
How this was calculated
  1. The Mian-Chowla sequence is the greedy Sidon (B2) sequence: start with 1 and always take the smallest next integer whose pairwise sums with all earlier terms are all new.
  2. A Sidon set demands that every sum a + b with a <= b is unique, so each candidate is tested against the whole bank of sums built so far.
  3. Running the greedy rule out to term 10 gives a(10) = 81, with 55 pairwise sums all distinct.
  4. Mian and Chowla introduced the sequence in 1944; the greedy choice is provably not optimal - denser Sidon sets exist - but it is the canonical construction.

The Mian-Chowla sequence is built by one greedy rule with a strict condition: start with 1, 2, 4, and at each step take the smallest larger integer whose pairwise sums with all existing terms - including the sum of the candidate with itself - are all new. The first twelve terms are 1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, 123.

The condition makes the sequence a Sidon set in the making (a B2 sequence): every pairwise sum a_i + a_j with i <= j has exactly one representation. Sidon sets are prized in combinatorics, radar design and coding theory for precisely this uniqueness - no sum ever collides with another, so no decoder can be confused.

This Mian-Chowla sequence calculator grows the sequence greedily with an exact used-sum set. Landmarks: the 10th term is a(10) = 81, with 55 pairwise sums kept distinct at that point; the 15th term is a(15) = 204, with 120 distinct pairwise sums; the first 12 terms sum to 492 and their largest pairwise sum is 246.

Worked examples

The 10th term

(Value at n · 10)

Mian-Chowla value a(10)81
previous term a(9)66
pairwise sums kept distinct so far55
largest pairwise sum 2 x a(10)162

The 15th term

(Value at n · 15)

Mian-Chowla value a(15)204
previous term a(14)182
pairwise sums kept distinct so far120
largest pairwise sum 2 x a(15)408

First 12 terms

(First n terms · 12)

first 12 Mian-Chowla terms1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, 123
last term123
sum of the terms492
largest pairwise sum246

The greedy rule

Greedy means locally smallest, forever. Given the terms so far, test candidates in increasing order: a candidate c is accepted only if c + a_i is new for every existing term a_i and the double 2c is new as well. Starting from 1, 2, 4, the sums already in use are 2, 3, 4, 5, 6, 8. Candidate 5 would add 5 + 1 = 6, but 6 is already 2 + 4, so 5 is rejected. Candidate 6 fails because 6 + 2 = 8 = 4 + 4. Candidate 7 fails because 7 + 1 = 8. Candidate 8 adds 9, 10, 12 and 16 - all new - and is accepted as the fourth term.

Every rejection is a collision with the past, and the collisions multiply. When the sequence has k terms, the used set holds k(k + 1) / 2 sums - 55 sums at the 10th term, 120 at the 15th - and each candidate must thread its own k + 1 new sums past all of them. That quadratic squeeze is why the terms grow the way they do: 81 by the 10th term, 204 by the 15th, while remaining the smallest values greed allows at every step.

  • Accept the smallest candidate with all-new pairwise sums
  • 5, 6 and 7 collide; 8 is accepted
  • Used sums: 55 at term 10, 120 at term 15

The terms themselves

The first twelve terms - 1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, 123 - sum to 492, and their largest pairwise sum is 246, the double of the largest term. Eleven of the twelve are at most 100; the twelfth jumps to 123. Early on the sequence almost keeps pace with the integers (1, 2, 4), then the sum-distinctness condition bites: gaps of 5, 8, 10, 14, 21 open up as each new term must dodge a quadratically growing set of forbidden sums.

Individual landmarks worth memorising: a(9) = 66 and a(10) = 81; a(14) = 182 and a(15) = 204. The largest pairwise sum at the 10th term is 162 (twice 81) and at the 15th term 408 (twice 204) - the extremes of the sum set are always the doubles of the extremes of the term set.

  • First 12 terms sum to 492; largest pairwise sum 246
  • a(9) = 66, a(10) = 81; a(14) = 182, a(15) = 204
  • Eleven of the first twelve terms are at most 100

Sidon sets and why they matter

A set whose pairwise sums are all distinct is called a Sidon set, or B2 set. The Mian-Chowla sequence is the greedy infinite Sidon set: the lexicographically smallest one that starts 1, 2, 4, built with no choices and no lookahead. Any finite prefix is a genuine Sidon set, ready to use.

Finite Sidon sets earn their keep wherever differences or sums must be unambiguous: radar and sonar pulse trains (distinct sums mean distinct, decodable echoes), radio telescope array layouts, and constructions in error-correcting codes. Greedy is not optimal - specially constructed finite Sidon sets can sometimes fit one more element into the same range - but greedy is canonical: there is exactly one Mian-Chowla sequence, anyone following the rule reproduces it exactly, and its prefixes are available at every size.

  • Sidon (B2): every pairwise sum unique
  • Greedy prefix = a Sidon set at every size
  • Used in radar, arrays and coding theory

Mian and Chowla, 1944

The sequence is named for Abdul Majid Mian and Sarvadaman Chowla, who described the greedy construction in 1944, in the early decades of additive number theory's fascination with sum-distinct sets. The question they were circling - how densely can integers be packed while keeping all pairwise sums distinct? - has a classical answer in scale: the count of terms up to x grows roughly like the square root of x, and the greedy sequence tracks that order while making no claim to optimality.

That combination - an elementary rule, a canonical output, and an optimality question that resists easy answers - is why the sequence remains a standard exhibit in combinatorics courses and a benchmark for exact greedy computation: any implementation that disagrees with 1, 2, 4, 8, 13, 21 has a bug, and the bug is findable by hand at the first divergence.

  • Described by Mian and Chowla in 1944
  • Term count grows on the order of sqrt(x)
  • A benchmark for exact greedy algorithms

Computing it exactly

The calculator keeps the used-sum set explicitly and tests candidates one at a time - no heuristics and no approximations, so every term returned is exactly the greedy term. The discipline that makes it correct is simple to state: a candidate's sums are added to the used set only after the candidate has passed every test. Add them early and a rejected candidate pollutes the set, corrupting every later term; the history of greedy-sequence bugs is mostly this one mistake.

The supported ranges (the nth term for n up to 200, listings up to bounds of 100,000) stay fast because the bookkeeping, while quadratic in the number of terms, is trivial arithmetic. The nth mode reports the term, the previous term, the count of pairwise sums kept distinct, and the largest pairwise sum, so the state of the construction is visible at every step.

Determinism deserves one more emphasis, because it is what makes the sequence a reference rather than a proposal. There is no randomness, no tie-breaking and no parameter to tune: two correct implementations, in any language, on any hardware, produce identical terms forever, and the first point of disagreement with the published sequence localises a bug to a single acceptance decision. Few infinite objects in mathematics are simultaneously this easy to specify and this unforgiving to implement - which is exactly why the page shows the used-sum counts (55 at the 10th term, 120 at the 15th) as intermediate checkpoints: an implementation can be validated mid-construction, not only at the final term.

  • Exact used-sum set; no heuristics
  • Sums are committed only after acceptance
  • Nth mode reports the full construction state

Using the calculator

Nth mode returns a(n) - counting from a(1) = 1, so the 10th term is a(10) = 81 - together with the previous term, the number of distinct pairwise sums so far, and the largest pairwise sum. List mode returns the first n terms with their sum and largest pairwise sum: the first 12 terms sum to 492 with largest pairwise sum 246.

A hand-check worth doing once: pick the listed terms 45 and 66, whose sum is 111, and confirm no other pair from the list makes 111. That uniqueness, checked on the page's own output, is the entire definition - the rest of the page is commentary.

  • Counting starts at a(1) = 1
  • First 12 terms: sum 492, largest pairwise sum 246
  • Hand-check: 45 + 66 = 111 has no rival pair

FAQs

What is the Mian-Chowla sequence?

The greedy Sidon (B2) sequence: starting from 1, 2, 4, each next term is the smallest integer whose pairwise sums with all existing terms, including itself, are all distinct. It begins 1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, 123.

What is the 10th Mian-Chowla term?

a(10) = 81. At that point 55 pairwise sums are being kept distinct, and the largest pairwise sum is 162.

What is the 15th Mian-Chowla term?

a(15) = 204, following a(14) = 182, with 120 distinct pairwise sums and a largest pairwise sum of 408.

Why is 5 not a Mian-Chowla term?

Because 5 + 1 = 6 duplicates the existing sum 2 + 4. Candidates 6 and 7 collide too (6 + 2 = 8 = 4 + 4, and 7 + 1 = 8), so the term after 4 is 8.

What do the first 12 Mian-Chowla terms sum to?

492. Their largest pairwise sum is 246, twice the largest term 123.

Who were Mian and Chowla?

Abdul Majid Mian and Sarvadaman Chowla, who described this greedy Sidon sequence in 1944. Sidon sets are used in radar design and coding theory, where unique pairwise sums prevent ambiguity.

Sources

Related calculators

Ulam Number Calculator
Test whether a number is an Ulam number: build the sequence by the unique-sum rule and count its representations as a sum of two distinct earlier Ulam numbers, with its position and the next Ulam number.
Recaman Sequence Calculator
Generate Recaman's sequence term a(n) by the subtract-if-possible rule, with the neighbouring terms and the largest value so far.
Golomb Sequence Calculator
The Golomb sequence: the self-describing sequence where each value k appears exactly a(k) times, generated by its own recurrence.