Quadruple Congruence (noch nicht übersetzt)

Problem 875

For a positive integer n we define q(n) to be the number of solutions to:

a21+a22+a23+a24b21+b22+b23+b24(modn)

where 0ai,bi<n. For example, q(4)=18432.

Define Q(n)=ni=1q(i). You are given Q(10)=18573381.

Find Q(12345678). Give your answer modulo 1001961001.