How do I draw this tree pattern in python?
<p>Given a height  1&lt;=h&lt;=15, how do I go about drawing this tree? I'll need to be able to traverse it later to solve some questions.</p>

<p>For h = 1, just the root labeled 1.</p>

<p>For h = 2, </p>

<pre><code> 3
1 2 
</code></pre>

<p>For h = 3, </p>

<pre><code>    7
  3   6
 1 2 4 5
</code></pre>

<p>etc.  </p>

<p>All that really strikes so far has been trying to find a relation from the top-down (for the left side tree, the left node will be (parent-1)/2 and the right child is parent-1 but this isn't a consistent pattern), but I can't seem to find anything . Since i need to be able to generate the tree, I'm not sure how to use a heap-structure either.  I'm not sure where to start on recursion either. Any ideas are welcome. </p>