Algorithms and complexity - Wilf, Herbert S. (Prentice-Hall, Inc, 1986)