Added newton's method and permutations of numbers