3
![Mathematics](//cdn.sstatic.net/Sites/math/img/apple-touch-icon.png)
The approach you're taking is much more complicated than the easiest approach to generating the graphs counted by A000109. So if you don't mind, I'll give you an easy-to-implement way to generate those graphs, rather than an easy-to-implement way to check for planarity (which I'm not sure exists,...