Algorithms with numbers and sequences