_Long Comment_
There are many possible "numbering schema" but in any case, you have to take care of the details of the syntax.
For Gödel original numbering, see:
* Jean van Heijenoort (editor), From Frege to Gödel: A Source Book in Mathematical Logic (1967), page 600:
The symbol $\supset$ [i.e. $\to$] is an abbreviation, and thus for _modus ponens_ we have:
> A formula $c$ is called an _immediate consequence_ of $a$ and $b$ if $a$ is the formula $(\lnot (b)) \lor (c)$.
"$\lnot$" is codified with $5$ while "$\lor$" is codified with $7$ and we need $11$ and $13$ for "(" and ")" respectively.
Having said that, $a$ will be codified by [if I've made no mistakes...]:
> $2^{11}3^55^{11}7^{\\#b}11^{13}13^{11}17^719^{11}23^{\\#c}29^{13}$
where I've abbreviated with $\\#p$ the code for the formula $p$.