Packing 2x1x1 prisms into larger prisms

I'm currently having an issue where I need to pack 2x1x1 prisms into a larger prism of size 2x2x3. How many such ways is possible? What about for generic prisms of size 2x2xk?

I've tried to figure out patterns or ways to order the different possibilities, but I am having trouble visualizing this.

Thank you for the assistance!

• The number of packings of a $2\times2\times k$ prism are given in OEIS sequence A006253. In particular, for $k=3$ there are $32$. – FredH Mar 26 at 3:25
• @FredH Thank you for the sequence, but I'm looking for a way to derive the explicit formula given k – Larrisa Garnet Mar 26 at 3:30
• see refs in OEIS A006253. – achille hui May 8 at 20:34
• oops, I have forgotten I have solved the $2\times 2\times n$ version of this problem before. see answers of this question – achille hui May 8 at 20:38

One way to do it is to make a set of coupled recurrences. Imagine building your $$2 \times 2 \times n$$ prism sitting on the table extending away from you. Let $$A(n)$$ be the number of ways to build a prism. Now think you fill the cube nearest you, with priority to top left, top right, bottom left, bottom right in that order. Define a new variable for each configuration of cubes beyond a solid block, so $$B(n)$$ is the number of ways to make a prism of length $$n$$ plus a $$1 \times 1 \times 2$$ sticking horizontally away from you. You have $$B(n)=A(n)$$ because you can't get this shape except by starting with a complete prism and adding one block. There are two other ways you can add a block to a full prism, horizontally or vertically. Those are two more configurations. Now imagine adding a block to each. Eventually there won't be any more configurations and you have your coupled recurrences. Now you can eliminate variables to get down to some minimal number. There are two recurrences given in the formulas to the OEIS sequence. You can check your result against those.