Javascript implementation of "Ulam spiral".