The [[wp:Mian–Chowla sequence|Mian–Chowla sequence]] is an integer sequence defined recursively.


Mian–Chowla is an infinite instance of a [[wp:Sidon sequence|Sidon sequence]], and belongs to the class known as B₂ sequences.


The sequence starts with:

::<span style="font-style:italic;font-weight:bold;font-size:125%;">a<sub>1</sub> = 1</span>

then for <span style="font-style:italic;font-weight:bold;font-size:125%;padding:.3em;">n > 1,</span> <span style="font-style:italic;font-weight:bold;font-size:125%;padding:.3em;">a<sub>n</sub></span> is the smallest positive integer such that every pairwise sum

::<span style="font-style:italic;font-weight:bold;font-size:125%;">a<sub>i</sub> + a<sub>j</sub> 

is distinct, for all <span style="font-style:italic;font-weight:bold;font-size:125%;">i</span> and <span style="font-style:italic;font-weight:bold;font-size:125%;">j</span> less than or equal to <span style="font-style:italic;font-weight:bold;font-size:125%;">n</span>.

;The Task:

:* Find and display, here, on this page the first 30 terms of the Mian–Chowla sequence.
:* Find and display, here, on this page the 91st through 100th terms of the Mian–Chowla sequence.


Demonstrating working through the first few terms longhand:

::<span style="font-style:italic;font-weight:bold;font-size:125%;">a<sub>1</sub> = 1</span>

::<span style="font-weight:bold;">1 + 1 = 2</span>

Speculatively try <span style="font-style:italic;font-weight:bold;font-size:125%;padding:.3em;">a<sub>2</sub> = 2</span>

::<span style="font-weight:bold;">1 + 1 = 2</span>
::<span style="font-weight:bold;">1 + 2 = 3</span>
::<span style="font-weight:bold;">2 + 2 = 4</span>

There are no repeated sums so '''2''' is the next number in the sequence.

Speculatively try <span style="font-style:italic;font-weight:bold;font-size:125%;padding:.3em;">a<sub>3</sub> = 3</span>

::<span style="font-weight:bold;">1 + 1 = 2</span>
::<span style="font-weight:bold;">1 + 2 = 3</span>  
::<span style="font-weight:bold;">1 + 3 = <span style="background-color:yellow;">4</span></span>
::<span style="font-weight:bold;">2 + 2 = <span style="background-color:yellow;">4</span></span>
::<span style="font-weight:bold;">2 + 3 = 5</span>
::<span style="font-weight:bold;">3 + 3 = 6</span>

Sum of '''4''' is repeated so '''3''' is rejected.

Speculatively try <span style="font-style:italic;font-weight:bold;font-size:125%;padding:.3em;">a<sub>3</sub> = 4</span>

::<span style="font-weight:bold;">1 + 1 = 2</span>
::<span style="font-weight:bold;">1 + 2 = 3</span>
::<span style="font-weight:bold;">1 + 4 = 5</span>
::<span style="font-weight:bold;">2 + 2 = 4</span>
::<span style="font-weight:bold;">2 + 4 = 6</span>
::<span style="font-weight:bold;">4 + 4 = 8</span>

There are no repeated sums so '''4''' is the next number in the sequence.

And so on...

;See also:

:* [[oeis:A005282|OEIS:A005282 Mian-Chowla sequence]]

