Background
Consider the shape \$T(n)\$ consisting of a triangular array of \$\frac{n(n+1)}{2}\$ unit regular hexagons:
Image may be NSFW.
Clik here to view.
John Conway proved that \$n = 12k + 0,2,9,11\$ if and only if \$T(n)\$ can be tiled (i.e. exactly covered without overlapping) with \$T(2)\$. At the same time, he also proved that no coloring argument could prove the fact. (Yes, this is yet another Conway challenge.)
Challenge
Let's define \$a_n\$ as the number of distinct tilings of \$T(n)\$ by \$T(2)\$. Compute as many terms of \$a_n\$ as possible in 10 minutes.
Reflection and/or rotation of a tiling is considered distinct from itself, unless the two are identical.
The program that prints the largest number of terms wins. In case of tie, the one that prints the last term in shorter time wins.
I have a Windows 10 machine with Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
and 32GB RAM, with Ubuntu 18.04 installed in WSL. Please include the instructions to run your code and where it works (Windows or Linux).
Output format (with test cases)
The submission should print the results infinitely for each \$n\$ starting from 0. Each line should include the values of \$n\$ and \$a_n\$. Here is first 21 lines of the expected output:
0 11 02 13 04 05 06 07 08 09 210 011 812 1213 014 7215 016 017 018 019 020 021 18532822 023 473652024 2161745625 026 91237074427 028 029 030 031 032 0
Test cases for \$n \le 20\$ are generated using a naive Python 3 program. \$a_{21}\$ through \$a_{32}\$ (meaningful highest being \$a_{26}\$) were found using Arnauld's JS submission.
Notably, neither the full sequence 1, 0, 1, 0, 0, 0, ...
nor the stripped-down one 1, 1, 2, 8, 12, 72, ...
is on OEIS yet. As I don't have an OEIS account, I will let anyone interested to post this sequence (both versions) to OEIS (please leave a comment before you do). The sequence of nonzero indices is A072065. Edit: The sequence is on A334875, thanks to Lyxal.
Leaderboard
- Rust with
rustc -O
by Anders Kaseorg, Score 44 at 45s - C++ with
g++ -O3
by l4m2, Score 35 at 7min - Javascript with
node
by Arnauld, Score 32 at 1.8s
Pending
- (none)