I was asked this problem in an interview. I could not figure out a way apart from taking all possibilities—i.e., complete brute force.
You have 3 kind of cubes 1×1×1, 1×2×1, and 1×1×2. How many ways can you make a cube of dimension 1×2n×k using the above types of cubes?
for reduce this question i delete one constant dimension .
and this question equal by:
how many matching in Lattice graph with 2^n X k size?
because for each match we have one pattern to fill our Square,that set (1*2 Square) where the edge is match.and for other square set (1*1 Square)
i guess Matching polynomial & Bipartite graph is useful.
in same question with(n=1) you can use recursive function to solve it.and it is easy to prove that the result is between fibonacci_number and Catalan_number(for more details see Fibonacci numbers and Brick Wall Patterns in this link)