Permutations of a binary search tree of height x

"How many permutations exist for a binary search tree with eight elements with a tree of height five?"

Recently I needed to determine the number of permutations that exist for a given input into a binary search tree with a height of x.  There are algorithms to determine this, but doing them by hand is tedious and error-prone, and I wasn't able to find a table online to check my answers against.  I wrote a small program to test all combinations for a given input; below are the resulting tables.

Elements (Rows), Tree Height (Columns), Permutations (Cells)

1 2 3 4 5 6 7 8 9 10 11 12
2200000000000
3240000000000
40168000000000
5040641600000000
6080400208320000000
70802240204860864000000
80011360188168352166412800000
900550401687681044483001643522560000
1000253440150803212775684790409920011008512000
1100105600013501312157272327345536195008030848027136102400
120038016001213625601971636481122553603614195272934409154566553620480

So, if one asks "How many permutations exist for a binary search tree with eight elements with a tree of height five?", you look up in the table and find that there are 8352 permutations possible.

Part of the process for determining the total permutations is to break the problem down.  You do this by computing the number of permutations with a given root value, and add all of the totals with a set root to come to the total number of permutations.  Below are the per-root tables.

Rows are height, columns are root values, cells are permutations.

Three Elements: {1,2,3}

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 2)00200000000000
Height at 2 (total 4)02020000000000
Height at 3 (total 0)00000000000000

Four Elements: {1,2,3,4}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 16)02662000000000
Height at 3 (total 8)04004000000000
Height at 4 (total 0)00000000000000

Five Elements: {1,2,3,4,5}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 40)008248000000000
Height at 3 (total 64)016160161600000000
Height at 4 (total 16)08000800000000
Height at 5 (total 0)00000000000000

Six Elements: {1,2,3,4,5,6}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 80)0004040000000000
Height at 3 (total 400)04080808080400000000
Height at 4 (total 208)064400040640000000
Height at 5 (total 32)0160000160000000
Height at 6 (total 0)00000000000000

Seven Elements: {1,2,3,4,5,6,7}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 80)000080000000000
Height at 3 (total 2240)08024048064048024080000000
Height at 4 (total 2048)04003842400240384400000000
Height at 5 (total 608)02089600096208000000
Height at 6 (total 64)0320000032000000
Height at 7 (total 0)00000000000000

Eight Elements: {1,2,3,4,5,6,7,8}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 0)00000000000000
Height at 3 (total 11360)08056016803360336016805608000000
Height at 4 (total 18816)02240280026881680168026882800224000000
Height at 5 (total 8352)020481456672006721456204800000
Height at 6 (total 1664)0608224000022460800000
Height at 7 (total 128)0640000006400000
Height at 8 (total 0)00000000000000

Nine Elements: {1,2,3,4,5,6,7,8,9}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 0)00000000000000
Height at 3 (total 55040)006404480134401792013440448064000000
Height at 4 (total 168768)01136017920224002150422400215042240017920113600000
Height at 5 (total 104448)01881616384116485376053761164816384188160000
Height at 6 (total 30016)08352486417920001792486483520000
Height at 7 (total 4352)016645120000051216640000
Height at 8 (total 256)012800000001280000
Height at 9 (total 0)00000000000000

Ten Elements: {1,2,3,4,5,6,7,8,9,10}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 0)00000000000000
Height at 3 (total 253440)000576040320806408064040320576000000
Height at 4 (total 1508032)05504010224016128020160023385623385620160016128010224055040000
Height at 5 (total 1277568)01687681693441474561048324838448384104832147456169344168768000
Height at 6 (total 479040)010444875168437761612800161284377675168104448000
Height at 7 (total 99200)030016149764608000046081497630016000
Height at 8 (total 11008)04352115200000011524352000
Height at 9 (total 512)025600000000256000
Height at 10 (total 0)00000000000000

Eleven Elements: {1,2,3,4,5,6,7,8,9,10,11}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 0)00000000000000
Height at 3 (total 1056000)0000576002688004032002688005760000000
Height at 4 (total 13501312)0253440550400102240016128002150400232243221504001612800102240055040025344000
Height at 5 (total 15727232)0150803216876801693440147456010483209031681048320147456016934401687680150803200
Height at 6 (total 7345536)01277568104448075168043776016128001612804377607516801044480127756800
Height at 7 (total 1950080)0479040300160149760460800004608014976030016047904000
Height at 8 (total 308480)09920043520115200000011520435209920000
Height at 9 (total 27136)0110082560000000025601100800
Height at 10 (total 1024)051200000000051200
Height at 11 (total 0)00000000000000

Twelve Elements: {1,2,3,4,5,6,7,8,9,10,11,12}  

012345678910111213
Height at 0 (total 0)00000000000000
Height at 1 (total 0)00000000000000
Height at 2 (total 0)00000000000000
Height at 3 (total 3801600)000004224001478400147840042240000000
Height at 4 (total 121362560)01056000278784060544001124640017952000215846402158464017952000112464006054400278784010560000
Height at 5 (total 197163648)01350131216588352185644801862784016220160150796801507968016220160186278401856448016588352135013120
Height at 6 (total 112255360)01572723214053248114892808268480481536017740801774080481536082684801148928014053248157272320
Height at 7 (total 36141952)073455365269440330176016473605068800050688016473603301760526944073455360
Height at 8 (total 7293440)0195008010912004787201267200000126720478720109120019500800
Height at 9 (total 915456)030848012108828160000000281601210883084800
Height at 10 (total 65536)0271365632000000005632271360
Height at 11 (total 2048)01024000000000010240
Height at 12 (total 0)00000000000000