A small program for creating a tree of Optimal Addition Chains created for exercise 2.1 of "From Mathematics to Generic Programming"
The program outputs a string with the graph in DOT notation, so DOT is a needed to execute To install dot
pacman -S graphviz
apt-get install graphviz
go run main.go | dot -Tpng > tree.png && xdg-open tree.png
Note that xdg-open is only for opening and can change in your OS.