Processing math: 100%

Problem #306

PP vs NP

Rob is a chess freak but he also likes to play sudoku. Since he is bad at both the games, he wants to make a new game. In this game he will take a n*n chess board. He will then place all the numbers {1,2,3,...n} in each row and in each column. But to win the game you have to place these numbers in such a way that in each row, all the numbers from 1 to n are placed and similarly in each column numbers from 1 to n are placed. Also for each row and column, then numbers on white squares sum to the same amount as the number on black squares. He wants to get the chess board printed. He likes to know for what value of n such a board can be made. In other words, for what value of n such a placement is possible for at least one configuration. Find the sum of all such n \le 10^{123} . Since this number is large, find it modulo 1000000007.

Contributed by Ashutosh Singh

Solved by 46 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.