Formula to convert ISO A series paper sizes to C series (envelopes)
<p>Based on the <a href="https://secure.wikimedia.org/wikipedia/en/wiki/ISO_216#The_C_series" rel="nofollow">Wikipedia article</a>, the best I've been able to come up with so far is this, which works for 9/11 sizes:</p>

<pre><code>A_SERIES = [
    [841, 1189],
    [594, 841],
    [420, 594],
    [297, 420],
    [210, 297],
    [148, 210],
    [105, 148],
    [74, 105],
    [52, 74],
    [37, 52],
    [26, 37]]

C_SERIES = [
    [917, 1297],
    [648, 917],
    [458, 648],
    [324, 458],
    [229, 324],
    [162, 229],
    [114, 162],
    [81, 114],
    [57, 81],
    [40, 57],
    [28, 40]]

def a_to_c(dimension):
    return dimension * pow(2, 1.0 / 8)

def main():
    for a_values, c_values in zip(A_SERIES, C_SERIES):
        a_to_c_values = [
            int(round(a_to_c(a_values[0]))),
            int(round(a_to_c(a_values[1])))]
        if a_to_c_values != c_values:
            print str([a_to_c(a_values[0]), a_to_c(a_values[1])]) + ' != ' + str(c_values)

if __name__ == '__main__':
    main()

$ ./an-to-cn.py 
[161.39514443445813, 229.00662385970412] != [162, 229]
[114.50331192985206, 161.39514443445813] != [114, 162]
[80.69757221722907, 114.50331192985206] != [81, 114]
</code></pre>

<p><strong>Edit</strong>: Great answers so far, which make it clear that computing the C size based on <em>arbitrary</em> widths and heights (which was the goal of this project) is not possible. I'll just use the 2^(1/8) factor without rounding to come as close as possible to the <em>idea</em> of the thing. Resulting OpenSCAD <a href="https://github.com/l0b0/metal-book/blob/master/book.scad" rel="nofollow">code</a>:</p>

<pre><code>outer_width = paper_width * pow(2, 1.0 / 8);
outer_height = paper_height * pow(2, 1.0 / 8);
</code></pre>
