N represents the number of payment periods. Supposing you arranged for a mortgage to buy a house; you'd have to make n payments of so many dollars per month to pay off the mortgage (the total amount due,with interest).
If the annual interest rate were r, and payments were due monthly (12 payments per year), then the monthly interest rate would be r/n = r/12. The typical 30-year mortgage involves monthly payments over a 30 year time span. This comes to 360 monthly mortgage payments.
There are 6! possible permutations of the blue books, 2 possible permutations of the red books, 4! possible permutations of the green books and 3! possible permutations of the three color groups. therefore the total number of ways of arranging the books is given by: