The Question
What is the probability, rolling $n$ six-sided dice twice, that their sum each time totals to the same amount? For example, if $n = 4$, and we roll $1,3,4,6$ and $2,2,5,5$, adding them gives
$$ 1+3+4+6 = 14 = 2+2+5+5 $$
What is the probability this happens as a function of $n$?
Early Investigation
This problem is not too hard for $n = 1$ or $n = 2$ via brute force...
For $n = 2$:
Tie at a total of $2$: $$ \frac{1}{36} * \frac{1}{36} = \frac{1}{1296} $$
Tie at a total of $3$: $$ \frac{2}{36} * \frac{2}{36} = \frac{4}{1296} $$
etc.
so the answer is $$ \frac{1^2 + 2^2 + 3^2 + ... + 6^6 + 5^2 + ... + 1^2}{1296} = \frac{\frac{(6)(7)(13)}{6} + \frac{(5)(6)(11)}{6}}{1296} = \frac{146}{1296} $$
Note that I use the formula: $\sum_{k=1}^{n}k^2=\frac{(n)(n+1)(2n+1)}{6}$.
Is there a way to do this in general for $n$ dice? Or at least a process for coming up with a reasonably fast brute force formula?
The Difficulty
The problem arises that the sum of squares is not so simple when we get to three dice.
Using a spreadsheet, I figured out we need to sum these squares for 3 dice:
$$ 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1 $$
For a brute force answer of $\frac{4332}{46656}$. Note how we can no longer use the sum of squares formula, as the squares we need to sum are no longer linear.
Some Thoughts
I am no closer to figuring out an answer for $n$ dice, and obviously the question becomes increasingly more difficult for more dice.
One thing I noticed: I see a resemblance to Pascal's Triangle here, except we start with the first row being six $1$, not one $1$. Se we have:
1 1 1 1 1 1
1 2 3 4 5 6 5 4 3 2 1
1 3 6 10 15 21 25 27 27 25 21 15 10 6 3 1
1 4 9 16 25 36 46 52 54 52 46 36 25 16 9 4 1
...
but that's still a process, not a formula. And still not practical for $n = 200$.
I know how to prove the formula for any cell in Pascal's Triangle to be $C(n,r) = \frac{n!}{r!(n-r)!}$... using induction; that doesn't really give me any hints to deterministically figuring out a similar formula for my modified triangle. Also there is no immediately obvious sum for a row of this triangle like there is (powers of 2) in Pascal's Triangle.
Any insight would be appreciated. Thanks in advance!
It is possible to calculate this exactly if you are willing to use arbitrary precision integer arithmetic.
You can use the recursion $$f(n,k)=\sum_{j=1}^6 f(n-1,k-j)$$ starting at $f(0,0)=1$ and $f(0,k)=0$ when $k\not =0$ to find the number of ways of scoring $k$ from $n$ dice. Your result is then $$\sum_{i=n}^{6n} f(n,i)^2 / 6^{2n}$$ which is the division of two very large integers: for $n=200$ the numerator will be about $2.1\times 10^{309}$ and the denominator will be $6^{400}\approx 1.8\times 10^{311}$.
More practically using a spreadsheet and only looking for several decimal places you can use $$g(n,k)=\sum_{j=1}^6 g(n-1,k-j) / 6$$ starting at $g(0,0)=1$ and $f(0,k)=0$ when $k\not =0$ to find the probability of scoring $k$ from $n$ dice. Your result is then $$\sum_{i=n}^{6n} g(n,i)^2.$$
With $n=200$ this latter method will just over 200 columns and 1200 rows of the spreadsheet, so not difficult, and an extra column for the squares of the final column. In practice it give a value of about $0.0116752$ for the probability of matched sums rolling 200 dice twice.
This compares with about $0.0116798$ from joriki's approximation, a relative difference of around 0.04%.