## Number sequence puzzle

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

### Number sequence puzzle

Guess the next number in the sequence:

Code: Select all

``1, 6, 36, 146, 511, 1512``
Bozo knows the answer, although this required an embarrassingly large amount of coding time.

Big hint: it's tablebase related.

marcelk
Posts: 348
Joined: Fri Feb 26, 2010 11:21 pm
Contact:

### Re: Number sequence puzzle

sje wrote:Guess the next number in the sequence:

Code: Select all

``1, 6, 36, 146, 511, 1512``
Bozo knows the answer, although this required an embarrassingly large amount of coding time.

Big hint: it's tablebase related.
Is it different from 4032, with applications in chemistry (alkanes)? That would be really cool.

sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

### Re: Number sequence puzzle

marcelk wrote:Is it different from 4032, with applications in chemistry (alkanes)? That would be really cool.
You got it. Did you calculate the number, or did you find it somewhere?

Rémi Coulom
Posts: 427
Joined: Mon Apr 24, 2006 6:06 pm
Contact:

### Re: Number sequence puzzle

sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

### Re: Number sequence puzzle

The numbers are the counts of distinct endgame classes:

Code: Select all

``````    &#123; Tablebase class counts, each for N men &#125;

tbcm02len =     1;
tbcm03len =     6;
tbcm04len =    36;
tbcm05len =   146;
tbcm06len =   511;
tbcm07len =  1512;
tbcm08len =  4032;
tbcm09len =  9752;
tbcm10len = 21942;
``````
That this should match the alkane sequence first described in 1897 is quite unexpected.

The match ends at N=10 because at N=11 the KPPPPPPPPPK class would be included, but would be inadmissible as it has nine pawns and so is unreachable.

Ajedrecista
Posts: 1394
Joined: Wed Jul 13, 2011 7:04 pm
Contact:

### Number sequence puzzle and interesting download.

Hello Steven:
sje wrote:Guess the next number in the sequence:

Code: Select all

``1, 6, 36, 146, 511, 1512``
Bozo knows the answer, although this required an embarrassingly large amount of coding time.

Big hint: it's tablebase related.

I was going to try to calculate these numbers on my own (very risky) but I remember that once I downloaded an excellent Excel file about that! This forum is excellent and I recommend it. Here is where I downloaded it:

http://kirill-kryukov.com/chess/discuss ... 6be#p58156

TBs combinatorics.rar (351.75 KiB)

Great merit of user kronsteen. Please download it because it deserves the download. The numbers match: 2520 different types for 8-man and 1512 + 2520 = 4032 is the next number of this sequence.

I am curious about this required an embarrassingly large amount of coding time... how much time (if you want to say it)?

Regards from Spain.

Ajedrecista.

sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

### Re: Number sequence puzzle and interesting download.

Ajedrecista wrote:I am curious about this required an embarrassingly large amount of coding time... how much time (if you want to say it)?
It took hours of thought and coding, and the sad part is that I had solved a very similar problem (TB class dependency) long ago. My major mistake was to first try using the material signature as a sort of index variable; what I should have done from the start was to split the signature into its two color indexed components.

sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

### Re: Number sequence puzzle

Someone should inform OEIS and Wikipedia of the serendipitous discovery of this connection between chess and chemistry.

Thompson calculated the first four elements of the TB class name sequence some thirty years ago and the paraffin series has been around for more than a century. But apparently not until this week has anyone made the connection.

Ajedrecista
Posts: 1394
Joined: Wed Jul 13, 2011 7:04 pm
Contact:

### Thank you Steven.

Hello Steven:
sje wrote:
Ajedrecista wrote:I am curious about this required an embarrassingly large amount of coding time... how much time (if you want to say it)?
It took hours of thought and coding, and the sad part is that I had solved a very similar problem (TB class dependency) long ago. My major mistake was to first try using the material signature as a sort of index variable; what I should have done from the start was to split the signature into its two color indexed components.