Question No: 337
The
cells of a
grid are filled in using the numbers
through
so that each row contains
different numbers, and each of the three
blocks heavily outlined in the example below contains
different numbers, as in the first three rows of a Sudoku puzzle.
![[asy] unitsize(20); add(grid(9,3)); draw((0,0)--(9,0)--(9,3)--(0,3)--cycle, linewidth(2)); draw((3,0)--(3,3), linewidth(2)); draw((6,0)--(6,3), linewidth(2)); real a = 0.5; label("5",(a,a)); label("6",(1+a,a)); label("1",(2+a,a)); label("8",(3+a,a)); label("4",(4+a,a)); label("7",(5+a,a)); label("9",(6+a,a)); label("2",(7+a,a)); label("3",(8+a,a)); label("3",(a,1+a)); label("7",(1+a,1+a)); label("9",(2+a,1+a)); label("5",(3+a,1+a)); label("2",(4+a,1+a)); label("1",(5+a,1+a)); label("6",(6+a,1+a)); label("8",(7+a,1+a)); label("4",(8+a,1+a)); label("4",(a,2+a)); label("2",(1+a,2+a)); label("8",(2+a,2+a)); label("9",(3+a,2+a)); label("6",(4+a,2+a)); label("3",(5+a,2+a)); label("1",(6+a,2+a)); label("7",(7+a,2+a)); label("5",(8+a,2+a)); [/asy]](https://latex.artofproblemsolving.com/d/f/3/df3daade257e4001f968e9c379a01ae9c94e8883.png)
The number of different ways to fill such a grid can be written as
where
,
,
, and
are distinct prime numbers and
,
,
,
are positive integers. Find
.